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

Issue 1337263003: Revert of Do not consolidate data in BMPImageDecoder (Closed)

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

Description

Revert of Do not consolidate data in BMPImageDecoder (patchset #9 id:160001 of https://codereview.chromium.org/1259083003/ ) Reason for revert: crbug.com/530279 This comment [1] describes what needs to be done to reland. [1] https://code.google.com/p/chromium/issues/detail?id=530279#c1 Original issue's description: > Do not consolidate data in BMPImageDecoder > > In BMPImageDecoder, never call SharedBuffer::data(), which potentially > copies all the data. Instead, do the following: > > - Read directly from the SharedBuffer when it is safe to do so. e.g. > when only one byte is needed. We already know there is enough data, > and getSomeData will return at least a byte if there is enough data. > - Use a FastSharedBufferReader when we may be on a segment boundary. > > As a result, we make fewer copies when decoding BMPs. We never call > SharedBuffer::data(), which copies up to the entire encoded data > received so far. Occasionally we will make small copies when a two or > four byte number is on a segment boundary. > > Add a setter to FastSharedBufferReader to update its SharedBuffer, so the > BMPImageReader can have one as a member, which it will reuse across calls. > > Remove BIG_ENDIAN, and eliminate another memcpy that was there to support > it. > > Using my modified version of ImageDecodeBench (see crrev.com/1145373003), > I see a slight speedup as compared to the old version which relied on > SharedBuffer::data(). (My data can be found here: [1].) This matches my > expectations, since the new version is copying less data. > > Using a version of ImageDecodeBench with a premerged buffer (see > crrev.com/1318713005), I still see a speed improvement, although it is > very small. (See sheet 2 of the above spreadsheet). > > [1] https://docs.google.com/a/google.com/spreadsheets/d/1GN2FDytKvkdZzV-WF4IEQaYQF65wa4bRxG67bNgpjAE/edit?usp=sharing > > BUG=467772 > > Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=201811 TBR=noel@chromium.org,pkasting@chromium.org,fmalita@chromium.org,scroggo@chromium.org NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=467772 Committed: https://crrev.com/019c3ffda974f22c79c7d2d4833c0a561bce206f git-svn-id: svn://svn.chromium.org/blink/trunk@202201 bbb929c8-8fbe-4397-9dbb-9b2b20218538

Patch Set 1 #

Patch Set 2 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+49 lines, -70 lines) Patch
M Source/platform/image-decoders/FastSharedBufferReader.h View 1 1 chunk +0 lines, -2 lines 0 comments Download
M Source/platform/image-decoders/FastSharedBufferReader.cpp View 1 1 chunk +0 lines, -10 lines 0 comments Download
M Source/platform/image-decoders/bmp/BMPImageDecoder.h View 1 1 chunk +5 lines, -0 lines 0 comments Download
M Source/platform/image-decoders/bmp/BMPImageDecoder.cpp View 1 2 chunks +2 lines, -7 lines 0 comments Download
M Source/platform/image-decoders/bmp/BMPImageReader.h View 1 6 chunks +28 lines, -32 lines 0 comments Download
M Source/platform/image-decoders/bmp/BMPImageReader.cpp View 1 7 chunks +12 lines, -15 lines 0 comments Download
M Source/platform/image-decoders/ico/ICOImageDecoder.h View 1 1 chunk +2 lines, -4 lines 0 comments Download

Messages

Total messages: 15 (5 generated)
scroggo
Created Revert of Do not consolidate data in BMPImageDecoder
5 years, 3 months ago (2015-09-14 13:30:10 UTC) #1
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1337263003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1337263003/1
5 years, 3 months ago (2015-09-14 13:30:12 UTC) #2
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. Only full committers are accepted. Even if an ...
5 years, 3 months ago (2015-09-14 13:30:14 UTC) #4
Noel Gordon
LGTM
5 years, 3 months ago (2015-09-14 13:35:59 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1337263003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1337263003/1
5 years, 3 months ago (2015-09-14 13:37:04 UTC) #7
commit-bot: I haz the power
Failed to apply patch for Source/platform/image-decoders/FastSharedBufferReader.cpp: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
5 years, 3 months ago (2015-09-14 13:37:20 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1337263003/170001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1337263003/170001
5 years, 3 months ago (2015-09-14 14:04:04 UTC) #12
commit-bot: I haz the power
Committed patchset #2 (id:170001) as https://src.chromium.org/viewvc/blink?view=rev&revision=202201
5 years, 3 months ago (2015-09-14 14:04:28 UTC) #13
Peter Kasting
LGTM. FYI, I don't have visibility of that bug.
5 years, 3 months ago (2015-09-14 19:43:20 UTC) #14
commit-bot: I haz the power
5 years, 3 months ago (2015-09-23 12:32:09 UTC) #15
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/019c3ffda974f22c79c7d2d4833c0a561bce206f

Powered by Google App Engine
This is Rietveld 408576698