[Webkit-unassigned] [Bug 51455] [chromium] Reduce canvas.toDataURL("image/png") run-time costs 300% (compression strategy)
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Wed Dec 22 18:44:25 PST 2010
https://bugs.webkit.org/show_bug.cgi?id=51455
--- Comment #3 from noel gordon <noel.gordon at gmail.com> 2010-12-22 18:44:25 PST ---
The alternative compression methods offered by libpng, namely, Z_RLE, Z_FILTERED,
and Z_HUFFMAN_ONLY, should then be considered. Z_FILTERED is slower, and not as
compressive as Z_HUFFMAN_ONLY, Z_RLE.
Z_HUFFMAN_ONLY seems a good choice compared to Z_RLE - that latter runs about 2-10%
slower (see http://optipng.sourceforge.net/pngtech/z_rle) for similar compressed
output data size (http://optipng.sourceforge.net/pngtech/z_rle.html).
Does the libpng compression level alter the results when using Z_HUFFMAN_ONLY? It
should not, but I varied the compression level from Z_BEST_SPEED (1) through to
maximal compression (9) to test:
huffman encoding (Z_HUFFMAN_ONLY) with compression levels [1-9]
1, extract image/png 156 ms length: 1204834 bytes
2, extract image/png 156 ms length: 1204834 bytes
3, extract image/png 156 ms length: 1204834 bytes
4, extract image/png 164 ms length: 1204834 bytes
5, extract image/png 168 ms length: 1204834 bytes
6, extract image/png 166 ms length: 1204834 bytes
7, extract image/png 166 ms length: 1204834 bytes
8, extract image/png 167 ms length: 1204834 bytes
9, extract image/png 166 ms length: 1204834 bytes
There was a consistent 10 ms increase in run-time cost for compression levels > 3.
Z_BEST_SPEED seems like a good choice.
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list