New issue
Advanced search Search tips

Issue 740829 link

Starred by 13 users

Issue metadata

Status: Archived
Owner:
Closed: Dec 20
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All
Pri: 3
Type: Feature



Sign in to add a comment

DevTools: add option to pause extension content scripts during performance profiling

Project Member Reported by addyo@chromium.org, Jul 11 2017

Issue description

Chrome Version: 59.0.3071.115 (Official Build) (64-bit)

What steps will reproduce the problem?
(1) Attempt to profile any site with costly Chrome extensions enabled (e.g AdBlock or uBlock Origin)
(2) Read back the trace. Timeline/Performance panel results can be heavily skewed by these extensions
(3) Only manually disabling the extensions or running in a fresh Chrome profile work around this issue. Most developers we speak to are not doing this step nor are aware of the impact it can have on traces.

What is the expected result?

Chrome extensions do not impact traces because ideally DevTools would disable them when profiling. Lighthouse uses a trick to disable extensions before running, runs audits and then re-enables these extensions after. It would be highly valuable if DevTools could do something similar: https://github.com/GoogleChrome/lighthouse/pull/1492

Caveat: I understand that DevTools itself has DevTools extensions that could be included in this group. As much as possible, if we could disable all extensions that can impact a trace that would be appreciated. 

Inspiration for this feature request:
https://twitter.com/_developit/status/883381308919099392
 
Traces that include extensions are still valuable, eg if there's a big with a particular extension that's slowing down part of your site that you could work around, so this should be an option.

Not sure what the default should be though.

Comment 2 by woxxom@gmail.com, Jul 11 2017

Simply profile in an incognito window.

Comment 3 by alph@chromium.org, Jul 11 2017

Owner: caseq@chromium.org
Status: Assigned (was: Unconfirmed)
FWIW, straight out disabling extensions is dangerous. For example, I use Great Suspender to suspend inactive tabs, and when that extension is disabled, I lose all my tabs. :)  

However there may be some opportunities where we could suspend Extensions from injecting any content scripts while we are profiling.

Comment 5 by bckenny@google.com, Jul 12 2017

Rather than outright disabling extensions, could this be done similar to how certain pages (chrome:// pages, Chrome Web Store, etc) don't allow extensions to operate on them? Extension state wouldn't be lost, other tabs wouldn't be affected, and extensions wouldn't need to be changed since they already need to handle being invoked on pages they aren't allowed to touch.

It would probably require a page refresh for extensions that have already injected content into the page, but it could cover the 80% use case (page-load traces; extensions using only APIs like webRequest) without a reload.
Summary: DevTools: add option to pause extension content scripts during performance profiling (was: DevTools: add option to disable extensions during performance profiling)
Owner: alph@chromium.org
Status: Archived (was: Assigned)

Sign in to add a comment