Intercepting requests is extremely slow, to help increase speed the connected agent should send a pattern of requests they'd like to intercept and inspector should then only forward requests that the url matches that pattern.
This seems reasonable but it's it's vitally important for headless that we're able to intercept /all/ requests if needed.
Right, patterns should be optional.
Yes, intercepting all should be possible just by passing something like: patterns: ["*"].
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/241c6b4df3f4c0b93d783ed2b5b8b448e4e2d285 commit 241c6b4df3f4c0b93d783ed2b5b8b448e4e2d285 Author: Nathan Bruer <allada@chromium.org> Date: Fri Aug 25 15:40:12 2017 [Devtools] Request interception will now forwards based on patterns. Changed protocol to now use pattern matching to forward only requests that match a pattern provided over protocol instead of all requests. This should increase the stalled speed a bit. R=dgozman,caseq,pfeldman BUG= 752617 , 702384 , 694547 Change-Id: I4df44475023c9d275bb6818f4270620945d0c7bd Reviewed-on: https://chromium-review.googlesource.com/602483 Commit-Queue: Blaise Bruer <allada@chromium.org> Reviewed-by: Dmitry Gozman <dgozman@chromium.org> Cr-Commit-Position: refs/heads/master@{#497419} [modify] https://crrev.com/241c6b4df3f4c0b93d783ed2b5b8b448e4e2d285/content/browser/devtools/devtools_url_request_interceptor.cc [modify] https://crrev.com/241c6b4df3f4c0b93d783ed2b5b8b448e4e2d285/content/browser/devtools/devtools_url_request_interceptor.h [modify] https://crrev.com/241c6b4df3f4c0b93d783ed2b5b8b448e4e2d285/content/browser/devtools/protocol/network_handler.cc [modify] https://crrev.com/241c6b4df3f4c0b93d783ed2b5b8b448e4e2d285/content/browser/devtools/protocol/network_handler.h [modify] https://crrev.com/241c6b4df3f4c0b93d783ed2b5b8b448e4e2d285/content/public/test/test_browser_context.cc [modify] https://crrev.com/241c6b4df3f4c0b93d783ed2b5b8b448e4e2d285/content/public/test/test_browser_context.h [add] https://crrev.com/241c6b4df3f4c0b93d783ed2b5b8b448e4e2d285/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/request-interception-patterns-expected.txt [add] https://crrev.com/241c6b4df3f4c0b93d783ed2b5b8b448e4e2d285/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/request-interception-patterns.js [add] https://crrev.com/241c6b4df3f4c0b93d783ed2b5b8b448e4e2d285/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/resources/small-test-1.txt [add] https://crrev.com/241c6b4df3f4c0b93d783ed2b5b8b448e4e2d285/third_party/WebKit/LayoutTests/http/tests/inspector-protocol/network/resources/small-test-2.txt [modify] https://crrev.com/241c6b4df3f4c0b93d783ed2b5b8b448e4e2d285/third_party/WebKit/Source/core/inspector/browser_protocol.json [modify] https://crrev.com/241c6b4df3f4c0b93d783ed2b5b8b448e4e2d285/third_party/WebKit/Source/devtools/front_end/sdk/NetworkManager.js
Comment 1 by alexclarke@chromium.org
, Aug 6 2017