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

Issue 18099004: Improve PNG decode performance: avoid branching in the row write loop (Closed)

Created:
7 years, 5 months ago by Noel Gordon
Modified:
6 years, 6 months ago
CC:
blink-reviews, eae+blinkwatch, dglazkov+blink, jeez, kbalazs, Ken Russell (switch to Gerrit), tonyg
Visibility:
Public.

Description

Improve PNG decode performance: avoid branching in the row write loop No change in behavior, no new tests. BUG=258324 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=175666

Patch Set 1 #

Total comments: 2

Patch Set 2 : repetitive patch. #

Patch Set 3 : template patch. #

Total comments: 11

Patch Set 4 : #

Patch Set 5 : Use setRGBA<false>, remove setRGBARaw. #

Patch Set 6 : Redo comment, re-run trys. #

Patch Set 7 : Once more, measurement post facto. #

Patch Set 8 : Refresh trys. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+32 lines, -11 lines) Patch
M Source/platform/image-decoders/ImageFrame.h View 1 2 3 4 5 6 2 chunks +11 lines, -3 lines 0 comments Download
M Source/platform/image-decoders/png/PNGImageDecoder.cpp View 1 2 3 4 5 6 1 chunk +21 lines, -8 lines 0 comments Download

Messages

Total messages: 64 (0 generated)
Noel Gordon
7 years, 5 months ago (2013-07-10 13:33:37 UTC) #1
Peter Kasting
https://codereview.chromium.org/18099004/diff/1/Source/core/platform/image-decoders/ImageDecoder.h File Source/core/platform/image-decoders/ImageDecoder.h (right): https://codereview.chromium.org/18099004/diff/1/Source/core/platform/image-decoders/ImageDecoder.h#newcode177 Source/core/platform/image-decoders/ImageDecoder.h:177: inline void setRGBAPremultiply(PixelData* dest, unsigned r, unsigned g, unsigned ...
7 years, 5 months ago (2013-07-10 18:24:47 UTC) #2
Noel Gordon
https://codereview.chromium.org/18099004/diff/1/Source/core/platform/image-decoders/ImageDecoder.h File Source/core/platform/image-decoders/ImageDecoder.h (right): https://codereview.chromium.org/18099004/diff/1/Source/core/platform/image-decoders/ImageDecoder.h#newcode177 Source/core/platform/image-decoders/ImageDecoder.h:177: inline void setRGBAPremultiply(PixelData* dest, unsigned r, unsigned g, unsigned ...
7 years, 5 months ago (2013-07-11 08:23:40 UTC) #3
Noel Gordon
I measured again to confirm: decoding the 154 GIF corpus images 500 times each, "separate" ...
7 years, 5 months ago (2013-07-11 15:02:21 UTC) #4
Peter Kasting
On 2013/07/11 15:02:21, Noel Gordon (Google) wrote: > I measured again to confirm: decoding the ...
7 years, 5 months ago (2013-07-11 17:08:48 UTC) #5
Noel Gordon
The code inlines they way I wrote it, and does not inline when written as ...
7 years, 5 months ago (2013-07-12 03:22:51 UTC) #6
Peter Kasting
On 2013/07/12 03:22:51, Noel Gordon (Google) wrote: > The code inlines they way I wrote ...
7 years, 5 months ago (2013-07-12 03:31:22 UTC) #7
Noel Gordon
On 2013/07/12 03:31:22, Peter Kasting wrote: > On 2013/07/12 03:22:51, Noel Gordon (Google) wrote: > ...
7 years, 5 months ago (2013-07-12 03:54:20 UTC) #8
Peter Kasting
On 2013/07/12 03:54:20, Noel Gordon (Google) wrote: > On 2013/07/12 03:31:22, Peter Kasting wrote: > ...
7 years, 5 months ago (2013-07-12 04:39:03 UTC) #9
Noel Gordon
On 2013/07/12 04:39:03, Peter Kasting wrote: > On 2013/07/12 03:54:20, Noel Gordon (Google) wrote: > ...
7 years, 5 months ago (2013-07-12 04:51:24 UTC) #10
Peter Kasting
On 2013/07/12 04:51:24, Noel Gordon (Google) wrote: > But I have forced it to inline. ...
7 years, 5 months ago (2013-07-12 20:44:21 UTC) #11
Peter Kasting
Noel, is there any way to get the desired speedup here without much code duplication? ...
7 years, 2 months ago (2013-10-08 00:23:09 UTC) #12
Peter Kasting
This has seen no activity for almost seven months (really, almost ten months; my last ...
6 years, 7 months ago (2014-05-05 19:04:51 UTC) #13
Noel Gordon
Was a taken off this onto more pressing thinks. It's Saturday here and I decided ...
6 years, 7 months ago (2014-05-10 14:42:42 UTC) #14
Noel Gordon
Next I, got the patch on https://codereview.chromium.org/18107003 working again so I could accurately measure decode ...
6 years, 7 months ago (2014-05-10 15:12:43 UTC) #15
Noel Gordon
My measured results with that template patch are: PNG : 300.188292 (before), 255.765057 (repetitive), 255.428839 ...
6 years, 7 months ago (2014-05-10 15:46:25 UTC) #16
Noel Gordon
Sorry meant, "are faster than ToT (before) for this ...", late here, wife's long gone ...
6 years, 7 months ago (2014-05-10 16:00:56 UTC) #17
eseidel
If we have a way to run our image decoding benchmarks on a mobile device, ...
6 years, 7 months ago (2014-05-11 08:44:36 UTC) #18
nduca
we dont have a good wholistic performance test story for image decode. noel has some ...
6 years, 7 months ago (2014-05-11 19:22:06 UTC) #19
Peter Kasting
This seems good in principle. https://codereview.chromium.org/18099004/diff/35001/Source/platform/image-decoders/ImageFrame.h File Source/platform/image-decoders/ImageFrame.h (right): https://codereview.chromium.org/18099004/diff/35001/Source/platform/image-decoders/ImageFrame.h#newcode167 Source/platform/image-decoders/ImageFrame.h:167: if (m_premultiplyAlpha) We could ...
6 years, 7 months ago (2014-05-12 19:36:10 UTC) #20
Noel Gordon
https://codereview.chromium.org/18099004/diff/35001/Source/platform/image-decoders/ImageFrame.h File Source/platform/image-decoders/ImageFrame.h (right): https://codereview.chromium.org/18099004/diff/35001/Source/platform/image-decoders/ImageFrame.h#newcode167 Source/platform/image-decoders/ImageFrame.h:167: if (m_premultiplyAlpha) On 2014/05/12 19:36:11, Peter Kasting wrote: > ...
6 years, 7 months ago (2014-05-13 01:39:19 UTC) #21
Peter Kasting
https://codereview.chromium.org/18099004/diff/35001/Source/platform/image-decoders/ImageFrame.h File Source/platform/image-decoders/ImageFrame.h (right): https://codereview.chromium.org/18099004/diff/35001/Source/platform/image-decoders/ImageFrame.h#newcode167 Source/platform/image-decoders/ImageFrame.h:167: if (m_premultiplyAlpha) On 2014/05/13 01:39:19, Noel Gordon (Google) wrote: ...
6 years, 7 months ago (2014-05-13 01:54:56 UTC) #22
Noel Gordon
https://codereview.chromium.org/18099004/diff/35001/Source/platform/image-decoders/png/PNGImageDecoder.cpp File Source/platform/image-decoders/png/PNGImageDecoder.cpp (right): https://codereview.chromium.org/18099004/diff/35001/Source/platform/image-decoders/png/PNGImageDecoder.cpp#newcode498 Source/platform/image-decoders/png/PNGImageDecoder.cpp:498: if (hasAlpha) { On 2014/05/12 19:36:11, Peter Kasting wrote: ...
6 years, 7 months ago (2014-05-13 01:56:31 UTC) #23
Noel Gordon
On 2014/05/13 01:54:56, Peter Kasting wrote: > https://codereview.chromium.org/18099004/diff/35001/Source/platform/image-decoders/ImageFrame.h > File Source/platform/image-decoders/ImageFrame.h (right): > > https://codereview.chromium.org/18099004/diff/35001/Source/platform/image-decoders/ImageFrame.h#newcode167 ...
6 years, 7 months ago (2014-05-13 02:01:49 UTC) #24
Peter Kasting
On 2014/05/13 02:01:49, Noel Gordon (Google) wrote: > On 2014/05/13 01:54:56, Peter Kasting wrote: > ...
6 years, 7 months ago (2014-05-13 02:03:01 UTC) #25
Noel Gordon
On 2014/05/13 02:03:01, Peter Kasting wrote: > If something is non-static inline and could just ...
6 years, 7 months ago (2014-05-13 02:25:47 UTC) #26
Noel Gordon
On 2014/05/13 01:54:56, Peter Kasting wrote: > https://codereview.chromium.org/18099004/diff/35001/Source/platform/image-decoders/ImageFrame.h > File Source/platform/image-decoders/ImageFrame.h (right): > > https://codereview.chromium.org/18099004/diff/35001/Source/platform/image-decoders/ImageFrame.h#newcode167 ...
6 years, 7 months ago (2014-05-13 02:34:45 UTC) #27
Noel Gordon
New patch uploaded, let me know if you want to retain the template or not.
6 years, 7 months ago (2014-05-13 02:38:55 UTC) #28
Noel Gordon
On 2014/05/11 08:44:36, eseidel wrote: > If we have a way to run our image ...
6 years, 7 months ago (2014-05-13 06:28:39 UTC) #29
Noel Gordon
On 2014/05/13 02:38:55, Noel Gordon (Google) wrote: > New patch uploaded, let me know if ...
6 years, 7 months ago (2014-05-13 15:04:42 UTC) #30
Peter Kasting
On 2014/05/13 15:04:42, Noel Gordon (Google) wrote: > On 2014/05/13 02:38:55, Noel Gordon (Google) wrote: ...
6 years, 7 months ago (2014-05-13 21:32:43 UTC) #31
Noel Gordon
I was suspicious that the changes suggested lead us back to a patch similar to ...
6 years, 7 months ago (2014-05-14 06:33:20 UTC) #32
Peter Kasting
On 2014/05/14 06:33:20, Noel Gordon (Google) wrote: > So I measured again to see if ...
6 years, 7 months ago (2014-05-14 06:53:47 UTC) #33
Noel Gordon
Are you saying that out test-harness on the perf bots are wrong? Ot that the ...
6 years, 7 months ago (2014-05-14 07:04:59 UTC) #34
Peter Kasting
On 2014/05/14 07:04:59, Noel Gordon (Google) wrote: > Are you saying that out test-harness on ...
6 years, 7 months ago (2014-05-14 07:23:23 UTC) #35
Noel Gordon
As an ex-compiler engineer, the above should be right up your street. Not really my ...
6 years, 7 months ago (2014-05-14 07:37:58 UTC) #36
Peter Kasting
On 2014/05/14 07:37:58, Noel Gordon (Google) wrote: > As an ex-compiler engineer, the above should ...
6 years, 7 months ago (2014-05-14 15:51:47 UTC) #37
Ken Russell (switch to Gerrit)
On 2014/05/14 15:51:47, Peter Kasting wrote: > On 2014/05/14 07:37:58, Noel Gordon (Google) wrote: > ...
6 years, 7 months ago (2014-05-14 20:16:35 UTC) #38
Peter Kasting
On 2014/05/14 20:16:35, Ken Russell wrote: > Peter, will you approve his patch assuming the ...
6 years, 7 months ago (2014-05-14 20:28:19 UTC) #39
Noel Gordon
On 2014/05/14 20:16:35, Ken Russell wrote: > Noel, could you possibly try replacing "static inline" ...
6 years, 7 months ago (2014-05-15 15:41:36 UTC) #40
Noel Gordon
On 2014/05/14 20:28:19, Peter Kasting wrote: > On 2014/05/14 20:16:35, Ken Russell wrote: > > ...
6 years, 7 months ago (2014-05-16 04:06:02 UTC) #41
Peter Kasting
On 2014/05/16 04:06:02, Noel Gordon (Google) wrote: > Put break-points on all ImageFrame::setRGBA*, and decoded ...
6 years, 7 months ago (2014-05-16 18:22:30 UTC) #42
Peter Kasting
Wait a minute, I just had an idea. Maybe we're seeing some of the effects ...
6 years, 7 months ago (2014-05-16 20:36:10 UTC) #43
Noel Gordon
On 2014/05/16 20:36:10, Peter Kasting wrote: > Maybe we're seeing some of the effects of ...
6 years, 7 months ago (2014-05-19 04:48:04 UTC) #44
Peter Kasting
On 2014/05/19 04:48:04, Noel Gordon (Google) wrote: > The GIF color table already has (pre-packed ...
6 years, 7 months ago (2014-05-19 12:46:42 UTC) #45
Noel Gordon
If the pref bots can't be trusted, I don't know who to trust anymore. I'm ...
6 years, 7 months ago (2014-05-20 15:43:20 UTC) #46
eseidel
You can try reaching out to the speed team (tonyg and co) if you need ...
6 years, 6 months ago (2014-05-28 23:54:31 UTC) #47
Peter Kasting
On 2014/05/28 23:54:31, eseidel wrote: > You can try reaching out to the speed team ...
6 years, 6 months ago (2014-05-28 23:56:21 UTC) #48
eseidel
Presumably by ken you mean kbr? ccing.
6 years, 6 months ago (2014-05-28 23:57:06 UTC) #49
tonyg
On 2014/05/28 23:54:31, eseidel wrote: > You can try reaching out to the speed team ...
6 years, 6 months ago (2014-05-29 00:04:39 UTC) #50
Noel Gordon
On 2014/05/29 00:04:39, tonyg wrote: > I didn't read all the context on this change, ...
6 years, 6 months ago (2014-05-29 13:03:24 UTC) #51
Noel Gordon
> On 2014/05/29 00:04:39, tonyg wrote: > > > > but I'd expect to see ...
6 years, 6 months ago (2014-06-03 05:56:20 UTC) #52
Noel Gordon
https://www.youtube.com/watch?v=RWGRO9KH8Mc
6 years, 6 months ago (2014-06-05 04:32:26 UTC) #53
Ken Russell (switch to Gerrit)
This change should be landed. It yields a dramatic speedup in PNG decoding, measured by ...
6 years, 6 months ago (2014-06-05 17:43:11 UTC) #54
Noel Gordon
Filed issue 381548 about the perf bots reporting no data for the image decode tests.
6 years, 6 months ago (2014-06-06 06:55:06 UTC) #55
Noel Gordon
The CQ bit was checked by noel@chromium.org
6 years, 6 months ago (2014-06-06 06:55:20 UTC) #56
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/noel@chromium.org/18099004/115001
6 years, 6 months ago (2014-06-06 06:56:15 UTC) #57
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_gpu_triggered_tests on tryserver.chromium.gpu ...
6 years, 6 months ago (2014-06-06 07:27:11 UTC) #58
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 6 months ago (2014-06-06 07:27:21 UTC) #59
commit-bot: I haz the power
Try jobs failed on following builders: win_gpu_triggered_tests on tryserver.chromium.gpu (http://build.chromium.org/p/tryserver.chromium.gpu/builders/win_gpu_triggered_tests/builds/7269)
6 years, 6 months ago (2014-06-06 07:27:23 UTC) #60
Noel Gordon
The CQ bit was checked by noel@chromium.org
6 years, 6 months ago (2014-06-06 13:22:27 UTC) #61
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/noel@chromium.org/18099004/135001
6 years, 6 months ago (2014-06-06 13:23:55 UTC) #62
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: blink_presubmit on tryserver.blink ...
6 years, 6 months ago (2014-06-06 13:26:10 UTC) #63
commit-bot: I haz the power
6 years, 6 months ago (2014-06-06 13:28:29 UTC) #64
Message was sent while issue was closed.
Change committed as 175666

Powered by Google App Engine
This is Rietveld 408576698