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

Heavy CPU usage with tray.setImage #26603

Closed
johannesjo opened this issue Nov 19, 2020 · 10 comments
Closed

Heavy CPU usage with tray.setImage #26603

johannesjo opened this issue Nov 19, 2020 · 10 comments

Comments

@johannesjo
Copy link

johannesjo commented Nov 19, 2020

Issue Details

  • Electron Version:
    • 10.1.5
  • Operating System:
    • several different Linux OS

Several of my users seem to experience heavy CPU usage with the tray icon:
johannesjo/super-productivity#675

@ckerr
Copy link
Member

ckerr commented Nov 19, 2020

Thanks for reporting this and helping to make Electron better!

Would it be possible for you to make a standalone testcase with only the code necessary to reproduce the issue? For example, Electron Fiddle is a great tool for making small test cases and makes it easy to publish your test case to a gist that Electron maintainers can use.

Stand-alone test cases make fixing issues go more smoothly: it ensure everyone's looking at the same issue, it removes all unnecessary variables from the equation, and it can also provide the basis for automated regression tests.

I'm adding the blocked/needs-repro label for this reason. After you make a test case, please link to it in a followup comment.

Thanks in advance! Your help is appreciated.

@johannesjo
Copy link
Author

Would checking out the repository provided above work as well?

@johannesjo
Copy link
Author

@electron-triage electron-triage removed the blocked/need-repro Needs a test case to reproduce the bug label Mar 9, 2021
@github-actions
Copy link
Contributor

github-actions bot commented Oct 6, 2022

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@github-actions github-actions bot added the stale label Oct 6, 2022
@johannesjo
Copy link
Author

bump

@github-actions github-actions bot removed the stale label Oct 7, 2022
@zcbenz zcbenz added the blocked/need-info ❌ Cannot proceed without more information label Nov 14, 2022
@zcbenz
Copy link
Contributor

zcbenz commented Nov 14, 2022

Checking out the pasted repo would require us to debug into the repo's code, which our team does not have time to do. If you could reproduce the problem with some simple code like below it would be much more practical for us to look into it, otherwise we have to close this issue as most of other Electron apps do not have this issue.

const {app, Tray} = require('electron')
let tray
app.once('ready', () => {
  tray = new Tray('/path/to-icon')
})

@johannesjo
Copy link
Author

This should reproduce the issue.

const {app, Tray} = require('electron')
let tray

app.once('ready', () => {
  tray = new Tray('/path/to-icon')

 setInterval(()=>{
        tr.setImage('path/to-icon);
 }, 500);
})

@github-actions
Copy link
Contributor

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@github-actions github-actions bot added the stale label Feb 24, 2023
@github-actions
Copy link
Contributor

This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Mar 27, 2023
@ckerr
Copy link
Member

ckerr commented Mar 28, 2023

I ran the testcase @ #26603 (comment) with Electron v23.2.0 on Ubuntu 22.04.02 and saw only minimal CPU use, so apparently this was fixed sometime in the interim between Electron 10 and 23 💫

If anyone is still experiencing this issue on a supported version of Electron, please file a new issue for that version of Electron. Thanks!

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

No branches or pull requests

4 participants