-
Notifications
You must be signed in to change notification settings - Fork 45.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DevTools: Improve named hooks network caching #22198
DevTools: Improve named hooks network caching #22198
Commits on Sep 1, 2021
-
DevTools: Separate named hooks I/O and CPU work by thread
Keep CPU bound work (parsing source map and AST) in a worker so it doesn't block the main thread but move I/O bound code (fetching files) to the main thread so we can benefit from Network caching for source files. Note that this change alone is not sufficient to be able to share the Network cache, but it will help making the subsequent work easier.
Brian Vaughn committedSep 1, 2021 Configuration menu - View commit details
-
Copy full SHA for 93d0e48 - Browse repository at this point
Copy the full SHA 93d0e48View commit details -
Small optimization to avoid serializing runtime source unnecessarily
For source that have source maps, the original source is retrieved using the source map. We only fall back to parsing the full source code is when there's no source map. The source is (potentially) very large, so we can avoid the overhead of serializing it unnecessarily to share it with the worker in this case.
Brian Vaughn committedSep 1, 2021 Configuration menu - View commit details
-
Copy full SHA for 92b9ccb - Browse repository at this point
Copy the full SHA 92b9ccbView commit details -
Move source file fetching into content script for better cache utiliz…
…ation Network requests made from an extension do not reuse the page's Network cache. To work around that, this commit adds a helper function to the content script (which runs in the page's context) that the extension can communicate with via postMessage. The content script can then fetch cached files for the extension.
Brian Vaughn committedSep 1, 2021 Configuration menu - View commit details
-
Copy full SHA for fa45ab3 - Browse repository at this point
Copy the full SHA fa45ab3View commit details -
Optimization: Don't invoke worker code when there are no named hooks
This waste a good bit of time for nothing.
Brian Vaughn committedSep 1, 2021 Configuration menu - View commit details
-
Copy full SHA for 6f59b58 - Browse repository at this point
Copy the full SHA 6f59b58View commit details -
Brian Vaughn committed
Sep 1, 2021 Configuration menu - View commit details
-
Copy full SHA for ac4c95d - Browse repository at this point
Copy the full SHA ac4c95dView commit details -
Pre-fetch (and cache) source files on component inspection
This reduces the impact for sites with CORS policies that prevent us from using the Network cache.
Brian Vaughn committedSep 1, 2021 Configuration menu - View commit details
-
Copy full SHA for 1184d5b - Browse repository at this point
Copy the full SHA 1184d5bView commit details -
Disable __PERFORMANCE_PROFILE__ flag
Brian Vaughn committedSep 1, 2021 Configuration menu - View commit details
-
Copy full SHA for 1335a3e - Browse repository at this point
Copy the full SHA 1335a3eView commit details -
Use devtools.network.onRequestFinished to cache resources loaded by t…
…he page This helps avoid unnecessary duplicate requests when hook names are parsed. Responses with a Vary: 'Origin' migt not match future requests. Caching the requests as they're made lets us avoid a possible (expensive) cache miss.
Brian Vaughn committedSep 1, 2021 Configuration menu - View commit details
-
Copy full SHA for e659554 - Browse repository at this point
Copy the full SHA e659554View commit details -
Updated the header comment for loadSourceAndMetadata
Brian Vaughn committedSep 1, 2021 Configuration menu - View commit details
-
Copy full SHA for 14535e1 - Browse repository at this point
Copy the full SHA 14535e1View commit details -
Disable fetchFileWithCaching for Firefox
For some reason in Firefox, chrome.runtime.sendMessage() from a content script never reaches the chrome.runtime.onMessage event listener. So we'll only pass this function through for Chrome (and Edge).
Brian Vaughn committedSep 1, 2021 Configuration menu - View commit details
-
Copy full SHA for 1839d12 - Browse repository at this point
Copy the full SHA 1839d12View commit details -
Expanded mime type check for cached files
Brian Vaughn committedSep 1, 2021 Configuration menu - View commit details
-
Copy full SHA for f9b27a6 - Browse repository at this point
Copy the full SHA f9b27a6View commit details