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

CPU spiking #817

Closed
davewasmer opened this issue Jun 1, 2018 · 7 comments
Closed

CPU spiking #817

davewasmer opened this issue Jun 1, 2018 · 7 comments

Comments

@davewasmer
Copy link
Contributor

Seeing consistently spiked CPU usage from this extension:

image

I suspect it's related to https://bugs.chromium.org/p/chromium/issues/detail?id=848210, since it seems like there is a synchronous XHR request happening here. FWIW, the Ghostery extension had the same issue and just published a fix for it, though I can't seem to track down what the actual fix was.

@RobbieTheWagner
Copy link
Member

I'm not very familiar with developing Chrome extensions. Would you be interested in helping determine a fix @davewasmer?

@davewasmer
Copy link
Contributor Author

Not much experience here either. And the Ghostery git history is confusing - I dunno if there is some closed source stuff going on, but AFAICT, the patched release just updated the changelog.

I'd say potentially try to make the XHR request async (I have no idea what the context is for it though, so not sure if that's feasible). If not, then maybe just wait for Chrome to patch - I doubt they will sit on it long. If anything this issue might at least help others who come searching.

@RobbieTheWagner
Copy link
Member

@teddyzeenny @thorsteinsson Any ideas? You guys would know more about dealing with Chrome extensions than I would, I think.

@john-kurkowski
Copy link

Ghostery's fix updated their dependencies, in package-lock.json. The relevant change must be in there.

@john-kurkowski
Copy link

In this extension's case, it's not a Chrome-specific fix. It's a fix to not use Synchronous XHR, on the line the OP mentioned. That would benefit all browsers.

Or keep using Synchronous XHR and wait for Chrome to publish a fix itself.

@RobbieTheWagner
Copy link
Member

I'm not sure if we need it to be synchronous or not or if we can make it async. Would anyone like to take a stab at it?

@stefanpenner
Copy link
Member

https://bugs.chromium.org/p/chromium/issues/detail?id=848210 is so serious it sounds like chrome folks are hoping to release another Chrome 67 by EOW to resolve. Fixing the above described problem.

I've opened a separate issue to track the sync XHR: #820

Given that Chrome folks will release a fix later this week. I think we can close this.

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

No branches or pull requests

4 participants