Skip to content
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

core: warn when extensions affected perf #5666

Merged
merged 5 commits into from
Jul 18, 2018
Merged

core: warn when extensions affected perf #5666

merged 5 commits into from
Jul 18, 2018

Conversation

patrickhulce
Copy link
Collaborator

@patrickhulce patrickhulce commented Jul 13, 2018

Related Issues/PRs
closes #5543
closes #4878

screen shot 2018-07-13 at 10 01 58 am

@paulirish
Copy link
Member

Oof. This'll hit basically every user. I feel like we should do this only above some threshold of main thread usage (and/or something else)

@patrickhulce
Copy link
Collaborator Author

Alright @paulirish how bout now only when chrome extensions had 100ms of bootup time?

Copy link
Member

@brendankenny brendankenny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! This will be a really nice warning to have in the report (I have no opinion on the specific threshold, but having one seems like a good idea).

The only shame is to have it only when running the bootup time audit. Maybe add a TODO to consider moving it into some core diagnostic (runner? no idea)? But that would require a lot of work (e.g. bootup breakdowns to computed artifacts), and in the extension and devtools (and CLI if using --only-categories) you'll always get the audit if you're running the perf category, so it should usually be fine

@@ -84,6 +84,7 @@ class BootupTime extends Audit {
* @return {Promise<LH.Audit.Product>}
*/
static async audit(artifacts, context) {
const runWarnings = artifacts.LighthouseRunWarnings || [];
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this always be defined (since part of the base artifacts provided by gatherrunner, but also because specified in requiredArtifacts)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah was just thinking about older fixtures or whatnot, I'll remove


if (hadExcessiveChromeExtension) {
runWarnings.push('Chrome extensions impacted the performance of this page. ' +
'Try running Lighthouse in a clean profile to avoid being impacted by extensions.');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"clean Chrome profile", maybe? and should we suggest the CLI or not worth it for the average extension/devtools user?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done. I think CLI isn't worth it, might just confuse folks :)

@patrickhulce
Copy link
Collaborator Author

todo added too!

// TODO: consider moving this to core gathering so you don't need to run the audit for warning
if (hadExcessiveChromeExtension) {
runWarnings.push('Chrome extensions impacted the performance of this page. ' +
'Try running Lighthouse in a clean Chrome profile to avoid being impacted by extensions.');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kaycebasques wdyt about this wording? "impacted" feels a little awkward to me, but I could roll with it.

I think we should add ", or incognito mode, " to the second sentence though.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Impacted" doesn't jump out to me, but since you summoned me:

  • Interfered
  • Negatively affected
  • Distorted

Chrome extensions negatively affected this page's load performance. Try auditing the page in incognito mode or from a clean Chrome profile.

(I think you can drop "to avoid being impacted by extensions"... it's clear enough why you'd use a clean profile or incognito)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good feedback @kaycebasques I like it! done

@paulirish
Copy link
Member

(hold off on merging). I want to add this right after we tag 3.0.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Chrome Extensions affect your results chrome-extension scripts included in audit report script timings
4 participants