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

Issue 1122103005: Avoid extra copy of CSS data. (Closed)

Created:
5 years, 7 months ago by Daniel Bratell
Modified:
5 years, 7 months ago
CC:
blink-reviews, gavinp+loader_chromium.org, Nate Chapin, tyoshino+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Avoid extra copy of CSS data. operator+ will always create new string buffers and that is a bit unnecessary if one of the strings that are concatenated is empty. By switching from operator+ to String::append TextResource::decodedText() can avoid a copy almost always since the flush string will almost always be empty. BUG=484713 R=mkwst@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=194975

Patch Set 1 #

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

Messages

Total messages: 6 (2 generated)
Daniel Bratell
Could you please take a look at this optimization. I found it through memory usage ...
5 years, 7 months ago (2015-05-06 07:44:45 UTC) #2
Mike West
LGTM, thanks!
5 years, 7 months ago (2015-05-06 14:16:25 UTC) #3
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1122103005/1
5 years, 7 months ago (2015-05-06 14:29:22 UTC) #5
commit-bot: I haz the power
5 years, 7 months ago (2015-05-06 14:31:57 UTC) #6
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://src.chromium.org/viewvc/blink?view=rev&revision=194975

Powered by Google App Engine
This is Rietveld 408576698