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

Issue 2641823004: [url] Reserve size in a smarter way to account for pre-allocated buffers (Closed)

Created:
3 years, 11 months ago by Charlie Harrison
Modified:
3 years, 10 months ago
Reviewers:
brettw
CC:
chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[url] Reserve size in a smarter way to account for pre-allocated buffers A previous change [1] changed the URL parsing code to be prepared to allocate and reserve size for its own buffers, rather than relying on callers to do so. However, the patch did not address all callers, and regressed performance for callers that *did* reserve their own buffers, by reserving a bit extra space (8 bytes) to account for escaped characters. Instead, if a caller has a pre-reserved buffer that we think can fit the entire URL (minus escaped chars), we should just use it. [1] https://codereview.chromium.org/2617173003/ BUG=657978 Review-Url: https://codereview.chromium.org/2641823004 Cr-Commit-Position: refs/heads/master@{#447372} Committed: https://chromium.googlesource.com/chromium/src/+/60e6ff0ec09380ea502aa26d6480fc528b555eb8

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+7 lines, -10 lines) Patch
M url/url_canon.h View 1 chunk +2 lines, -1 line 0 comments Download
M url/url_canon_relative.cc View 2 chunks +2 lines, -2 lines 0 comments Download
M url/url_canon_stdstring.h View 1 chunk +1 line, -2 lines 0 comments Download
M url/url_canon_stdstring.cc View 1 chunk +0 lines, -1 line 0 comments Download
M url/url_util.cc View 2 chunks +2 lines, -4 lines 0 comments Download

Messages

Total messages: 14 (9 generated)
Charlie Harrison
Hey Brett, I think this addresses the problem I noticed in the previous patch. To ...
3 years, 11 months ago (2017-01-19 20:56:39 UTC) #4
Charlie Harrison
Brett: friendly ping
3 years, 11 months ago (2017-01-24 15:23:50 UTC) #7
brettw
LGTM
3 years, 10 months ago (2017-01-31 21:24:23 UTC) #9
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/2641823004/1
3 years, 10 months ago (2017-01-31 21:59:17 UTC) #11
commit-bot: I haz the power
3 years, 10 months ago (2017-02-01 00:00:17 UTC) #14
Message was sent while issue was closed.
Committed patchset #1 (id:1) as
https://chromium.googlesource.com/chromium/src/+/60e6ff0ec09380ea502aa26d6480...

Powered by Google App Engine
This is Rietveld 408576698