You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently in Electron, Chrome, and Firefox, Cypress pauses every single request coming from the app to determine if the frame making the request is the AUT frame. This is really only needed to happen on ResourceType document requests. We have some data to suggest that possibly not pausing on every single request entering CDP/Web extension might improve performance of general network timings in the form of reducing blocking time.
Desired behavior
Cypress requests should only be paused if the request being made is a document request. This scope of work does not include support for electron as an electron upgrade is needed to support web filters (see issue #26621)
Right now, our invocation of Fetch.RequestPaused takes in every single request from the browser. However, the method Fetch.Enable takes an optional RequestPattern. For the use of cy.origin(), Cypress really only needs to intercept Document resourceType, which should greatly reduce the amount of intercepted requests and hypothetically would reduce blocking time.
Fetch.Enable is really the chromium mechanism we use to pause requests, but we leverage other methods in Electron and Firefox to accomplish the same thing. The good thing for us is that these methods, like onBeforeSendHeaders in electron, takes a WebRequestFilter option, and the extension method for Firefox also takes a RequestFilter, so we should be able to implement very similar logic across our supported browsers.
Test code to reproduce
N/A. enable browser CDP debug logs to see every inbound request in the pause handler
Cypress Version
12.11
Node version
v16.16.0
Operating System
macOS 12.6
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered:
Current behavior
Currently in Electron, Chrome, and Firefox, Cypress pauses every single request coming from the app to determine if the frame making the request is the AUT frame. This is really only needed to happen on ResourceType document requests. We have some data to suggest that possibly not pausing on every single request entering CDP/Web extension might improve performance of general network timings in the form of reducing blocking time.
Desired behavior
Cypress requests should only be paused if the request being made is a document request. This scope of work does not include support for electron as an electron upgrade is needed to support web filters (see issue #26621)
Right now, our invocation of Fetch.RequestPaused takes in every single request from the browser. However, the method Fetch.Enable takes an optional RequestPattern. For the use of cy.origin(), Cypress really only needs to intercept Document resourceType, which should greatly reduce the amount of intercepted requests and hypothetically would reduce blocking time.
Fetch.Enable is really the chromium mechanism we use to pause requests, but we leverage other methods in Electron and Firefox to accomplish the same thing. The good thing for us is that these methods, like onBeforeSendHeaders in electron, takes a WebRequestFilter option, and the extension method for Firefox also takes a RequestFilter, so we should be able to implement very similar logic across our supported browsers.
Test code to reproduce
N/A. enable browser CDP debug logs to see every inbound request in the pause handler
Cypress Version
12.11
Node version
v16.16.0
Operating System
macOS 12.6
Debug Logs
No response
Other
No response
The text was updated successfully, but these errors were encountered: