Chromium Code Reviews
DescriptionAvoid GURL allocations/copies/frees in RenderFrameImpl::willSendRequest
ContentRendererClient::WillSendRequest has an API which takes the request
URL as a GURL. This entails an allocation, copy and free when the method
returns. Even for moderate size URLs this work adds up and is visible
in profiles.
This patch threads a blink::WebURL instead of the GURL, as consumers really
just want to know the scheme. This copy-free approach is thread to callers
when possible. Because the method is only used for SearchBox and Extension
URLs, most subresources will take the no-copy path.
Additionally, this patch early-exits before doing some non-trivial work.
BUG=348655
Committed: https://crrev.com/29d7eaf19413110f27cc101c7e2d7088102184a5
Cr-Commit-Position: refs/heads/master@{#428754}
Patch Set 1 #Patch Set 2 : fix content shell #Patch Set 3 : compile fix #
Total comments: 8
Patch Set 4 : Devlin review #
Total comments: 3
Patch Set 5 : s/host/host_piece #Messages
Total messages: 33 (21 generated)
|