oxipng/tests
andrews05 4ae64c568b
Process files in parallel (#531)
This PR makes the oxipng binary process multiple files in parallel,
finally fulfilling #275. There seemed to be some debate about whether
oxipng _should_ do this or not but there's a couple of reasons I think
it makes sense:
1. The concern seemed mostly around the complexity of such a feature.
Not to worry, it was trivial* 🙂
2. Since then, oxipng has dropped from a max of something like 180
simultaneous compression trials down to 10, which is very much a good
thing but it does mean it's not utilising any more cores than that.

Some benchmarks on around 100 files on a machine with 8 cores:
Level | Master time | PR time
-|-|-
2 | 28.303 | 19.005
3 | 36.507 | 23.089
5 | 1:10.86 | 1:16.01

*Some additional changes were required in order to make sure sensible
output is printed to the terminal, since things won't be in order
anymore. Here's some example output from before:
```
Processing: tests/files/fully_optimized.png
    file size = 67 bytes (0 bytes = 0.00% decrease)
File already optimized
Processing: tests/files/corrupted_header.png
Invalid PNG header detected
Processing: tests/files/verbose_mode.png
    file size = 102480 bytes (12228 bytes = 10.66% decrease)
Output: tests/files/verbose_mode.png
```
And after:
```
Processing: tests/files/verbose_mode.png
Processing: tests/files/fully_optimized.png
Processing: tests/files/corrupted_header.png
tests/files/corrupted_header.png: Invalid PNG header detected
tests/files/fully_optimized.png: Could not optimize further, no change written
102480 bytes (10.66% smaller): tests/files/verbose_mode.png
```

Closes #275, #84, #169, #196 and #419.

[edit] This is the last thing I wanted to land before the next release 🥳
2023-07-11 03:45:10 -04:00
..
files Use stronger compression in eval (#509) 2023-07-08 18:54:58 -04:00
filters.rs Refactor aux chunk handling (#505) 2023-05-21 15:34:23 -04:00
flags.rs Process files in parallel (#531) 2023-07-11 03:45:10 -04:00
interlaced.rs Refactor aux chunk handling (#505) 2023-05-21 15:34:23 -04:00
interlacing.rs Refactor aux chunk handling (#505) 2023-05-21 15:34:23 -04:00
lib.rs Allow APNG with reductions disabled (#511) 2023-07-05 00:47:43 -04:00
raw.rs Revert "Provide BufferedZopfliDeflater and allow user to pass in a custom Deflater (#530)" 2023-07-09 13:40:20 -04:00
reduction.rs Try to pick tRNS value that's valid at low depth (#520) 2023-07-07 20:56:15 -04:00
regression.rs Use stronger compression in eval (#509) 2023-07-08 18:54:58 -04:00
strategies.rs Refactor aux chunk handling (#505) 2023-05-21 15:34:23 -04:00