Closed
Bug 1459566
Opened 8 years ago
Closed 8 years ago
Make "frameAncestors" and "proxyInfo" optional in webRequest details object
Categories
(WebExtensions :: Request Handling, enhancement)
WebExtensions
Request Handling
Tracking
(Not tracked)
RESOLVED
WONTFIX
People
(Reporter: kernp25, Unassigned)
Details
Maybe this will improve performance?
Because, not all extensions need this information.
Then it would look like:
browser.webRequest.onBeforeRequest.addListener(
test,
{urls: ["<all_urls>"]},
["frameAncestors"]
);
Comment 2•8 years ago
|
||
Do you have some numbers that show its a perf problem? The heavy lifting is already done in loadinfo.
Flags: needinfo?(mixedpuppy)
(In reply to Shane Caraveo (:mixedpuppy) from comment #2)
> Do you have some numbers that show its a perf problem? The heavy lifting is
> already done in loadinfo.
I do not have any numbers :)
It was just an idea how to improve maybe the performance.
Because, i was looking at this code:
https://searchfox.org/mozilla-central/rev/b28b94dc81d60c6d9164315adbd4a5073526d372/toolkit/modules/addons/WebRequestContent.js#157-167
https://searchfox.org/mozilla-central/rev/b28b94dc81d60c6d9164315adbd4a5073526d372/toolkit/components/extensions/webrequest/ChannelWrapper.cpp#582-634
https://searchfox.org/mozilla-central/rev/b28b94dc81d60c6d9164315adbd4a5073526d372/toolkit/components/extensions/webrequest/ChannelWrapper.cpp#811-844
and this code looks really large.
Comment 4•8 years ago
|
||
(In reply to kernp25 from comment #3)
> (In reply to Shane Caraveo (:mixedpuppy) from comment #2)
> > Do you have some numbers that show its a perf problem? The heavy lifting is
> > already done in loadinfo.
>
> I do not have any numbers :)
>
> It was just an idea how to improve maybe the performance.
>
> Because, i was looking at this code:
> https://searchfox.org/mozilla-central/rev/
> b28b94dc81d60c6d9164315adbd4a5073526d372/toolkit/modules/addons/
> WebRequestContent.js#157-167
That will only ever be hit by non-http requests, as such I don't see a performance implication here
> https://searchfox.org/mozilla-central/rev/
> b28b94dc81d60c6d9164315adbd4a5073526d372/toolkit/components/extensions/
> webrequest/ChannelWrapper.cpp#582-634
> https://searchfox.org/mozilla-central/rev/
> b28b94dc81d60c6d9164315adbd4a5073526d372/toolkit/components/extensions/
> webrequest/ChannelWrapper.cpp#811-844
>
> and this code looks really large.
These should only be hit when you actually access the properties. Of course, that happens in webrequest.jsm anyway whenever a listener exists. The values are cached, so the hit is only taken once. I don't think there is real overhead here, but given metrics showing otherwise we should do something about it. IIRC there are talos tests that use webrequest listeners, so those could probably be used to test whether there is any significant impact.
Updated•8 years ago
|
Status: UNCONFIRMED → RESOLVED
Closed: 8 years ago
Resolution: --- → WONTFIX
Comment 5•8 years ago
|
||
Given metrics that illustrate a problem we can revisit.
Updated•8 years ago
|
Product: Toolkit → WebExtensions
You need to log in
before you can comment on or make changes to this bug.
Description
•