Surfingkeys icon indicating copy to clipboard operation
Surfingkeys copied to clipboard

Occasional High CPU Usage

Open jeromebelleman opened this issue 1 year ago • 10 comments

Prelude

Yes, nobody reported it before.

Error details

SurfingKeys: 1.13.0

Browser: 111.0.5563.64 (Official Build) (64-bit)

URL: Any

Context

Sometimes, Surfingkeys uses ≈30% CPU, even if I'm not doing anything, ranking as the top CPU user in the Google Chrome Task Manager. Turning Surfingkeys on and off in chrome://extensions temporarily makes the problem disappear.

jeromebelleman avatar Mar 24 '23 11:03 jeromebelleman

Could you please provide the URLs on which such issue will happen?

brookhong avatar Mar 26 '23 02:03 brookhong

I experienced the same issue recently. Randomly it starts to use roughly 50% of the CPU. Turning off an on again solves the problem, until it comes back again.

marufHasanQ avatar Mar 27 '23 14:03 marufHasanQ

Hi Brook,

Could you please provide the URLs on which such issue will happen?

Difficult to tell which URL triggers the problem, as I have many tabs. Can you suggest a way to tell which tab makes Surfingkeys use CPU?

Thanks,

-- Jérôme

jeromebelleman avatar Mar 27 '23 15:03 jeromebelleman

Hi Brook,

It happened again, I closed all my tabs one by one and Surfingkeys continued using CPU even once they were all gone. The task manager showed:

image

Thanks, -- Jérôme

jeromebelleman avatar Mar 28 '23 12:03 jeromebelleman

Thanks for the information, then next step would be to inspect the background page of the extension, since all tabs are gone. You can go to chrome://extensions/, click on the background link on the card of Surfingkeys, it should launch inspect tool for the background page, hopefully there might be some error messages in console.

You can also build a dev version with npm run build:dev by cloning this repo, then set some breakpoints in the background to check if anything was stuck in background page(when the issue will happen next time), though I think it is impossible, since all actions in background would be triggered from Tabs, but it's worthy to try.

brookhong avatar Mar 28 '23 13:03 brookhong

I confirm the same issue under Chrome (CPU 100% usage and overheating, cured only by stopping the extension using Shift+Esc menu in Chrome). FF and Yandex browser never went into this trouble.

claimsecond avatar Apr 20 '23 06:04 claimsecond

Hi Brook,

I think that you can consistently reproduce the problem: type go to open a URL in the current tab, then type a string that Surfingkeys hasn't seen yet (e.g. not in the history or in any of the open tabs). No errors in the console when I inspect the background page. Are you able to reproduce it?

Thanks, -- Jérôme

jeromebelleman avatar Dec 11 '23 17:12 jeromebelleman

No. image

Do you have tons of items in your history?

brookhong avatar Dec 16 '23 02:12 brookhong

It seems that @awerty-noob mentioned a similar behavior https://github.com/brookhong/Surfingkeys/issues/1689#issuecomment-1194144939 -- a non-matching input in Omnibar could trigger high CPU usage, but I cannot reproduce it. I'm wondering whether there is a special item in your history that could possibly be part of the cause.

brookhong avatar Dec 17 '23 03:12 brookhong

I'm also experiencing this on Edge/Linux - couldn't find a link between the open tabs which cause this, but if I can help with debugging let me know

bogdan-calapod avatar Mar 22 '24 07:03 bogdan-calapod