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

Issue 2132783002: Fix png encoding performance regressions - downstream diff (Closed)

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

Description

Fix for png encoding performance regressions - downstream diff The original fix was: > 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. > > Review-Url: https://codereview.chromium.org/2062423002 This fix was effective everywhere we use clang, but did not work on Android (GCC) or Windows (MSVS) because the compiler was not applying the appropriate optimizations. This CL contains a more portable fix. This was briefly landed by libpng, but backed out. They fear it increases code size and that the compiler can be forced to make the same optimization. FWIW, we have demonstrated that we can force the compiler to make the same optimization. https://codereview.chromium.org/2119813003/ But we feel that changing the compiler options is fragile and it is better to just carry a diff. BUG=619850 BUG=599917 Committed: https://crrev.com/67058eff9c2a51e589388d7d494b1490530a1ec5 Cr-Commit-Position: refs/heads/master@{#404379}

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+116 lines, -15 lines) Patch
M third_party/libpng/README.chromium View 1 chunk +5 lines, -1 line 0 comments Download
M third_party/libpng/pngwutil.c View 9 chunks +111 lines, -14 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 19 (9 generated)
msarett
Not getting anywhere with libpng... Let's go ahead and carry a diff :(.
4 years, 5 months ago (2016-07-07 20:14:09 UTC) #3
Nico
lgtm, thanks
4 years, 5 months ago (2016-07-07 20:16:22 UTC) #4
Nico
(if you think it helps any, i'm happy to comment upstream somewhere as well. not ...
4 years, 5 months ago (2016-07-07 20:17:39 UTC) #5
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2132783002/1
4 years, 5 months ago (2016-07-07 20:26:41 UTC) #7
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: mac_chromium_gyp_rel on master.tryserver.chromium.mac (JOB_TIMED_OUT, no build URL)
4 years, 5 months ago (2016-07-07 22:28:36 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2132783002/1
4 years, 5 months ago (2016-07-07 23:54:26 UTC) #11
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 5 months ago (2016-07-08 00:28:36 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2132783002/1
4 years, 5 months ago (2016-07-08 12:21:08 UTC) #15
commit-bot: I haz the power
Committed patchset #1 (id:1)
4 years, 5 months ago (2016-07-08 14:29:27 UTC) #17
commit-bot: I haz the power
4 years, 5 months ago (2016-07-08 14:32:42 UTC) #19
Message was sent while issue was closed.
Patchset 1 (id:??) landed as
https://crrev.com/67058eff9c2a51e589388d7d494b1490530a1ec5
Cr-Commit-Position: refs/heads/master@{#404379}

Powered by Google App Engine
This is Rietveld 408576698