Closed Bug 1557300 Opened 5 years ago Closed 4 years ago

Using blocking webRequest APIs causes major performance issues when intercepting data URI requests

Categories

(WebExtensions :: Request Handling, defect, P2)

67 Branch
defect

Tracking

(firefox67 affected, firefox68 affected, firefox69 affected)

RESOLVED DUPLICATE of bug 1630737
Tracking Status
firefox67 --- affected
firefox68 --- affected
firefox69 --- affected

People

(Reporter: gildas.lormeau, Unassigned)

References

Details

Attachments

(1 file)

1.76 MB, application/x-zip-compressed
Details
Attached file files.zip

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:68.0) Gecko/20100101 Firefox/68.0

Steps to reproduce:

1 - Unzip the attached file somewhere on the disk
2 - Unzip and install the extension contained into bug-webrequest-file.zip. This extension registers 1000 empty handlers by calling browser.webRequest.onBeforeRequest.addListener(() => { }, { urls: ["<all_urls>"] }, ["blocking"]); 1000 times
3 - Open the index.html page (from the attached zip file). This page contains hundreds of data URIs.

Actual results:

The browser is unresponsive.

Expected results:

The browser should not be unresponsive. This issue does not exist in Chrome. Moreover, it seems that this API does not work with data URI requests, e.g. I wasn't able to cancel them.

Version: 68 Branch → 67 Branch

I'm confirming this, here is a sample requestDetails being sent:
{ "documentUrl": "moz-nullprincipal:{99fd9ed7-8845-4aa3-ab08-dafae7cf7bd1}", "frameAncestors": [], "frameId": 15032385550, "method": "null", "originUrl": "moz-nullprincipal:{99fd9ed7-8845-4aa3-ab08-dafae7cf7bd1}", "parentFrameId": 15032385537, "requestId": "fakeRequest-436", "tabId": 6, "timeStamp": 1559858482376, "type": "image", "url": "data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD....." }

Hi, I managed to reproduce this issue In our latest Nightly version 69.0a1 (2019-06-11) as well Release and Beta using the files attached to this issue. Thanks for reporting it and thanks for the test case provided.

Status: UNCONFIRMED → NEW
Component: Untriaged → Request Handling
Ever confirmed: true
Product: Firefox → WebExtensions

The priority flag is not set for this bug.
:ddurst, could you have a look please?

For more information, please visit auto_nag documentation.

Flags: needinfo?(ddurst)

Eventually the socket process may help here. We can also be smarter about how we handle these requests.

Flags: needinfo?(ddurst)
Priority: -- → P2
Depends on: 1631933

The duplicate here is newer, but has more information and a concrete plan for addressing this.

Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: