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 #
Messages
Total messages: 14 (9 generated)
|