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

Issue 1145373003: Copy SharedBuffer before calling decodeImageData (Closed)

Created:
5 years, 7 months ago by scroggo_chromium
Modified:
5 years, 3 months ago
Reviewers:
Noel Gordon
CC:
blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/blink.git@benchmarkEmail
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Copy SharedBuffer before calling decodeImageData With the existing JPEG code, the call to data() will copy all segments in the SharedBuffer together. When timing multiple iterations, only the first call does this, since the segments have already been copied. In order to get a more reasonable picture of how long the call to decode() takes, use a new SharedBuffer for each call to decodeImageData(). BUG=467772

Patch Set 1 #

Patch Set 2 : Copy outside the loop #

Patch Set 3 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -1 line) Patch
M Source/web/ImageDecodeBench.cpp View 1 2 1 chunk +7 lines, -1 line 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 3 (1 generated)
scroggo_chromium
I tested this on the set of images you sent me (the jpeg ones), and ...
5 years, 5 months ago (2015-07-23 21:42:08 UTC) #2
scroggo_chromium
5 years, 3 months ago (2015-09-04 16:10:36 UTC) #3
Message was sent while issue was closed.
On 2015/07/23 21:42:08, scroggo_chromium wrote:
> I tested this on the set of images you sent me (the jpeg ones), and this makes
> the test take longer, as expected, because now each call to decode requires
> merging all the buffers together.
> 
> I put up a spreadsheet here [1]. The relevant bits are the first four columns
on
> page one, which show how long it takes to decode each image (in total - 1000
> iterations) and on average, using the checked in version of the test, and the
> first four columns on page 2, which show the same timing information using
this
> version of the test. When I say it "take[s] longer", I mean that the total
time
> took longer, but maybe there is a smarter way to tally all the images? I also
> included file size, in case it's interesting to compare across file size.
> 
> (FWIW, the right set of columns on both pages is with my yet-to-be-uploaded
> change which avoids copying in JPEGImageDecoder, which looks worse running the
> existing version of the test, since the existing version of JPEGImageDecoder
is
> not being timed fairly - each iteration after the first need not copy. I'll
> upload that CL once I have the tests in the right place and run the layout
tests
> to confirm I have not broken anything. So those numbers may be premature but I
> think hint that it might be beneficial.)
> 
> 
> [1]
>
https://docs.google.com/a/google.com/spreadsheets/d/1l4gWB_S5oG6WEKrGx6ltBAiX...

Replaced by crrev.com/1318713005

Powered by Google App Engine
This is Rietveld 408576698