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

[Enhancement] Improve background CPU usage #3397

Closed
jmbreuer opened this issue Oct 11, 2023 · 4 comments
Closed

[Enhancement] Improve background CPU usage #3397

jmbreuer opened this issue Oct 11, 2023 · 4 comments
Labels
enhancement help wanted stale no reaction got for a long term

Comments

@jmbreuer
Copy link

Abstract

TreeStyleTabs seems to busy-wait/busy-poll stuff all the time.

Steps to see the situation

  1. Have a browsing session with, in my case, 644 tabs over 35 windows; otherwise completely idle (most of those tabs are 'discarded', see AutoTabDiscard)
  2. In about:processes, see "Extensions" taking up nearly 100% of one core (i7-6700HQ)
  3. Click on the conveniently located "Profile all threads of this process for 5 seconds" button of the Extensions process
  4. In the profile result, see updateTimeoutTimer in moz-extension://6efa3d93-bed2-4dff-a92a-064725d94b45/common/sidebar-connection.js:165:31 as the 'culprit'

Expected result

Idle CPU usage of below 30% ideally.

Actual (present) result

Idle CPU usage of 70% - 115% pretty much all the time.

Additional remarks

I'd be happy to know about a tunable where I could trade off this CPU usage against how quickly TST reacts to new tabs or such (which, by the way, already is noticeably slow for me - but if that is 'because' or 'despite' of this issue, I cannot say).

Environment

  • Platform (OS): Gentoo amd64
  • Version of Firefox: LibreWolf 118.0.1-1
  • Version (or revision) of Tree Style Tab: 3.9.17
@piroor
Copy link
Owner

piroor commented Oct 13, 2023

Could you try larger value for heartbeatInterval, for example 10000 ? The insternaloption is configurable via TST otpsions => Development => All Configs.

@piroor
Copy link
Owner

piroor commented Oct 30, 2023

I've increased the default heartbeat interval to 5000msec (5sec) to reduce CPU usage.

@github-actions github-actions bot added the stale no reaction got for a long term label Nov 11, 2023
Copy link

This issue has been labeled as "stale" due to no response by the reporter within 1 month (and 7 days after last commented by someone). And it will be closed automatically 14 days later if not responded.

Copy link

This issue has been closed due to no response within 14 days after labeled as "stale", 7 days after last reopened, and 7 days after last commented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement help wanted stale no reaction got for a long term
Projects
None yet
Development

No branches or pull requests

2 participants