Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(180)

Issue 2062423002: Fix performance regression in png encoding caused by libpng update (Closed)

Created:
4 years, 6 months ago by msarett
Modified:
4 years, 6 months ago
CC:
blink-reviews, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Fix performance regression in png encoding caused by libpng update libpng calculates "filter heuristics" to choose which png filter to apply. Chrome need not calculate these "filter heuristics" because we always choose to use the SUB filter, for speed. libpng 1.6 refactors the SUB filter to share code, also forcing us to calculate the filter heuristics, even though we don't need to. This caused a performance regression. This CL cherry picks a fix from upstream that: (1) Passes PNG_SIZE_MAX to the filter code. This allows the compiler to optimize out the heuristic calculation code, fixing the performance regression. (2) Fixes overflow handling in the calculation of filter heuristics. This won't affect Chrome. BUG=619850 BUG=599917 Committed: https://crrev.com/b43ad19eed3d9b660f2fc3e445e250a1b42b6b93 Cr-Commit-Position: refs/heads/master@{#401298}

Patch Set 1 #

Patch Set 2 : Add fixes to libpng #

Total comments: 9

Patch Set 3 : Clarify comments in PNGImageEncoder #

Patch Set 4 : Fix win #

Unified diffs Side-by-side diffs Delta from patch set Stats (+45 lines, -28 lines) Patch
M third_party/WebKit/Source/platform/image-encoders/PNGImageEncoder.cpp View 1 2 2 chunks +12 lines, -5 lines 0 comments Download
M third_party/libpng/BUILD.gn View 1 2 3 3 chunks +6 lines, -1 line 0 comments Download
M third_party/libpng/README.chromium View 1 1 chunk +3 lines, -0 lines 0 comments Download
M third_party/libpng/libpng.gyp View 1 2 3 1 chunk +4 lines, -2 lines 0 comments Download
M third_party/libpng/pngwutil.c View 1 6 chunks +20 lines, -20 lines 0 comments Download

Messages

Total messages: 43 (21 generated)
msarett
third_party/WebKit/ dglazkov@ third_party/libpng/ jochen@ Is there anything I need to do to make sure that ...
4 years, 6 months ago (2016-06-20 14:34:02 UTC) #2
jochen (gone - plz use gerrit)
+noel/mdempsky who might be better reviewers for this
4 years, 6 months ago (2016-06-21 07:36:00 UTC) #4
Nico
Can you make the CL description a bit longer? It looks like this cherry-picks an ...
4 years, 6 months ago (2016-06-21 12:39:13 UTC) #5
msarett
On 2016/06/21 12:39:13, Nico wrote: > Can you make the CL description a bit longer? ...
4 years, 6 months ago (2016-06-21 12:46:54 UTC) #7
msarett
+scroggo Please take a look!
4 years, 6 months ago (2016-06-21 17:27:07 UTC) #9
scroggo_chromium
https://codereview.chromium.org/2062423002/diff/20001/third_party/WebKit/Source/platform/image-encoders/PNGImageEncoder.cpp File third_party/WebKit/Source/platform/image-encoders/PNGImageEncoder.cpp (left): https://codereview.chromium.org/2062423002/diff/20001/third_party/WebKit/Source/platform/image-encoders/PNGImageEncoder.cpp#oldcode61 third_party/WebKit/Source/platform/image-encoders/PNGImageEncoder.cpp:61: // The parameters are the same as what libpng ...
4 years, 6 months ago (2016-06-21 17:39:44 UTC) #10
msarett
https://codereview.chromium.org/2062423002/diff/20001/third_party/WebKit/Source/platform/image-encoders/PNGImageEncoder.cpp File third_party/WebKit/Source/platform/image-encoders/PNGImageEncoder.cpp (left): https://codereview.chromium.org/2062423002/diff/20001/third_party/WebKit/Source/platform/image-encoders/PNGImageEncoder.cpp#oldcode61 third_party/WebKit/Source/platform/image-encoders/PNGImageEncoder.cpp:61: // The parameters are the same as what libpng ...
4 years, 6 months ago (2016-06-21 19:06:34 UTC) #11
scroggo_chromium
lgtm https://codereview.chromium.org/2062423002/diff/20001/third_party/WebKit/Source/platform/image-encoders/PNGImageEncoder.cpp File third_party/WebKit/Source/platform/image-encoders/PNGImageEncoder.cpp (right): https://codereview.chromium.org/2062423002/diff/20001/third_party/WebKit/Source/platform/image-encoders/PNGImageEncoder.cpp#newcode66 third_party/WebKit/Source/platform/image-encoders/PNGImageEncoder.cpp:66: // The zlib memory level is set to ...
4 years, 6 months ago (2016-06-21 19:26:15 UTC) #12
Nico
lgtm
4 years, 6 months ago (2016-06-21 21:14:13 UTC) #13
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2062423002/40001
4 years, 6 months ago (2016-06-21 21:20:35 UTC) #15
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/242784)
4 years, 6 months ago (2016-06-21 22:00:00 UTC) #17
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2062423002/60001
4 years, 6 months ago (2016-06-22 12:38:26 UTC) #19
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/243291)
4 years, 6 months ago (2016-06-22 13:17:29 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2062423002/80001
4 years, 6 months ago (2016-06-22 13:29:36 UTC) #24
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: ios-device-gn on tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-device-gn/builds/24944) mac_chromium_rel_ng on ...
4 years, 6 months ago (2016-06-22 13:32:02 UTC) #26
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2062423002/100001
4 years, 6 months ago (2016-06-22 13:42:17 UTC) #29
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: win_chromium_x64_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_x64_rel_ng/builds/233560)
4 years, 6 months ago (2016-06-22 14:21:06 UTC) #31
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2062423002/120001
4 years, 6 months ago (2016-06-22 14:30:05 UTC) #34
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 6 months ago (2016-06-22 15:41:33 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/2062423002/120001
4 years, 6 months ago (2016-06-22 16:09:40 UTC) #39
commit-bot: I haz the power
Committed patchset #4 (id:120001)
4 years, 6 months ago (2016-06-22 16:14:25 UTC) #41
commit-bot: I haz the power
4 years, 6 months ago (2016-06-22 16:16:10 UTC) #43
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/b43ad19eed3d9b660f2fc3e445e250a1b42b6b93
Cr-Commit-Position: refs/heads/master@{#401298}

Powered by Google App Engine
This is Rietveld 408576698