Shared-Reality-Lab / IMAGE-browser

IMAGE project browser extensions & client-side code
Other
2 stars 0 forks source link

100% CPU use by IMAGE browser extension #246

Closed jeffbl closed 1 year ago

jeffbl commented 2 years ago

Jeremy reports, "seen several occurrences of the IMAGE extension taking 99% of a CPU core under Chrome (as viewed in the Chrome Task Manager), even though I haven’t issued any requests through it in a long time. Don’t know if this is a Mac-specific issue".

Not sure if this is Mac specific. I'll try and keep an eye out on Linux to see if is there as well. I'd expect that there is a CPU spike on page load since we need to look at all the content to see if we need to insert any buttons for maps or charts, but we should check we're not doing any unnecessary CPU tasks, since this would impact browser performance, and battery life on laptops...

jeffbl commented 2 years ago

I am definitely seeing this as well in Brave on Linux. IMAGE extension is consuming an entire core when loading some pages, for many seconds (like 10s). Ironically, one page that seems to trigger it is:

https://www.lifewire.com/google-chrome-task-manager-4103619

mcgill-srl commented 2 years ago

I'm now seeing the heavy CPU load from the extension under Chrome on a Chromebook. Note that in all cases, I did not actually interact with the extension before seeing the high load.

jeffbl commented 2 years ago

@jaydeepsingh25 This coupled with #247 are top priority, especially since they smell to me like they are linked, and between the two of them, make the extension sometimes unusable.

I have not looked hard, but I don't recall seeing the CPU load until I'd made a query, beyond during page load, when I assume it is actually going through the page and looking for maps and charts, etc. That spike didn't seem excessive to me, but is worth looking at. The symptoms in #247 are more dire.

jeffbl commented 2 years ago

Please wait to close until Jeremy confirms he's not seeing this anymore when using released extension 0.3.1.

jeffbl commented 1 year ago

Closing based on fix. If we see it again, will reactivate this issue.

jeffbl commented 1 year ago

(I test on Brave, and I do not see the CPU ever hitting 100% when using IMAGE trying it on a few graphics)