New issue
Advanced search Search tips

Issue 857510 link

Starred by 1 user

Issue metadata

Status: Available
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Mac
Pri: 3
Type: Feature



Sign in to add a comment

WebRequest API is parsing form data unnecessarily

Project Member Reported by fmalita@chromium.org, Jun 28 2018

Issue description

Something I noticed while investigating  issue 853500 , documenting here in case it is actionable:


  - ChromeExtensionsNetworkDelegateImpl::OnBeforeURLRequest() (re)constructs a WebRequestInfo object for each invocation [1]

  - WebRequestInfo includes request_body_data, which is always parsed in the ctor [2]


If I'm following the code, we do this for every POST/PUT request, regardless of whether there are any extensions installed, or if any extension needs requestBody/webRequest at all.

Since parsing form data is non-trivial, is there some way to avoid it when there are no consumers?

(the original test involved a file sharing site - mega.nz - and I found we're diligently parsing formData for huge file uploads on a fresh Chromium profile with no extensions installed)



[1] https://cs.chromium.org/chromium/src/chrome/browser/net/chrome_extensions_network_delegate.cc?rcl=59587b94e68e180fb8dc24f9696748f4be363074&l=194

[2] https://cs.chromium.org/chromium/src/extensions/browser/api/web_request/web_request_info.cc?rcl=9942d2112e8631dc43d3e6f3531b2fca9d5bbcfa&l=280
 
Cc: -roc...@chromium.org rockot@google.com

Sign in to add a comment