You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Recently run cargo update on my project and noticed differences in png file compression size between png versions v0.17.5-v0.17.9 for an otherwise identically rendered fractal.
I started with png="=0.17.5" in Cargo.toml and ran cargo update; ./fractal.sh. This would update Cargo.lock, perform a clean release build and regenerate the fractal images. This did not result in a git diff.
I incrementally version bumped png from v0.17.5 -> v0.17.9 and observed the following changes in filesize
Unsure if my fractal images count as a representative image sample, but it appears something in the png compression algorithm was refactored in versions 0.17.6 resulting in 30-40% filesize increase, following a second refactor in 0.17.8 that reduced filesize 10-20%, whilst still remaining 20% larger than 0.17.5
I have documented this testcase as a series of git commits, in this branch:
We completely changed the compression libraries in 0.17.6 and again in 0.17.8!
As of 0.17.8, we use an extremely fast approach from fdeflate if you use Compression::Fast (which the image crate uses by default unless you override it) and use flate2 which is much slower but gets better compression ratios otherwise.
Recently run
cargo update
on my project and noticed differences in png file compression size between png versions v0.17.5-v0.17.9 for an otherwise identically rendered fractal.I started with png="=0.17.5" in Cargo.toml and ran
cargo update; ./fractal.sh
. This would update Cargo.lock, perform a clean release build and regenerate the fractal images. This did not result in a git diff.I incrementally version bumped png from v0.17.5 -> v0.17.9 and observed the following changes in filesize
CHANGE: fractal.png
21189 bytes (=0.17.5)
29596 bytes (=0.17.6) +40%
29596 bytes (=0.17.7) SAME
24981 bytes (=0.17.8) -20%
24981 bytes (=0.17.9) SAME == +20% overall
CHANGE: fractal.zoom.png
38284 bytes (=0.17.5)
50080 bytes (=0.17.6) +30%
50080 bytes (=0.17.7) SAME
45547 bytes (=0.17.8) -10%
45547 bytes (=0.17.9) SAME == +20% overall
Unsure if my fractal images count as a representative image sample, but it appears something in the png compression algorithm was refactored in versions
0.17.6
resulting in 30-40% filesize increase, following a second refactor in0.17.8
that reduced filesize 10-20%, whilst still remaining 20% larger than0.17.5
I have documented this testcase as a series of git commits, in this branch:
JamesMcGuigan/fractals@331dd24
JamesMcGuigan/fractals@15f12fb
JamesMcGuigan/fractals@a596fd3
JamesMcGuigan/fractals@760699d
JamesMcGuigan/fractals@9070746
The text was updated successfully, but these errors were encountered: