oxipng/tests
andrews05 71290acc62
Reduce memory usage of fast evaluation (#713)
This is an experiment I started a while ago before life happened. It
reduces memory usage of fast evaluation (-o2 and lower), bringing it
inline with normal (slow) evaluation. It does this by not retaining the
filtered image data of the evaluations, but instead retaining the row
filters that were used in each line so it can be quickly re-filtered
when required. This does incur a tiny performance penalty, but it's
negligible even at `-o0`.
Although this is fully functional, there are a few rough spots in the
code so I'm just opening it as a draft for now.

```
PR -sao6
       70.08 real       614.36 user         2.66 sys
          2024243200  maximum resident set size
          1839339520  peak memory footprint

PR -sao2
       11.16 real        60.85 user         1.33 sys
          1982562304  maximum resident set size
          1842173824  peak memory footprint

PR -sao2 -t1
       55.11 real        53.85 user         0.76 sys
           429457408  maximum resident set size
           245008064  peak memory footprint

master -sao6
       67.70 real       616.07 user         2.72 sys
          2043379712  maximum resident set size
          1838340416  peak memory footprint

master -sao2
       11.53 real        60.63 user         1.25 sys
          2753396736  maximum resident set size
          2283741440  peak memory footprint

master -sao2 -t1
       54.29 real        53.55 user         0.72 sys
           626311168  maximum resident set size
           305252544  peak memory footprint
```

Note that this involves some refactoring of `RowFilter` and the new
`FilterStrategy`. These are breaking changes so it will ultimately be
destined for v10. One advantage to this new structure is it opens the
door for future changes such as allowing the Brute strategy to take a
parameter for the number of lines.
2025-09-19 20:36:17 +02:00
..
files Disallow grayscale transformation if non-sRGB profile (#682) 2025-02-26 22:39:20 +01:00
filters.rs Reduce memory usage of fast evaluation (#713) 2025-09-19 20:36:17 +02:00
flags.rs Reduce memory usage of fast evaluation (#713) 2025-09-19 20:36:17 +02:00
interlaced.rs Reduce memory usage of fast evaluation (#713) 2025-09-19 20:36:17 +02:00
interlacing.rs Reduce memory usage of fast evaluation (#713) 2025-09-19 20:36:17 +02:00
lib.rs Skip signed files or remove C2PA metadata 2024-12-26 19:03:03 +01:00
raw.rs Reduce memory usage of fast evaluation (#713) 2025-09-19 20:36:17 +02:00
reduction.rs Reduce memory usage of fast evaluation (#713) 2025-09-19 20:36:17 +02:00
regression.rs Reduce memory usage of fast evaluation (#713) 2025-09-19 20:36:17 +02:00
strategies.rs Reduce memory usage of fast evaluation (#713) 2025-09-19 20:36:17 +02:00