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

lapce pegs CPU at 100% after starting up #461

Closed
zhaojiangbin opened this issue Apr 28, 2022 · 9 comments
Closed

lapce pegs CPU at 100% after starting up #461

zhaojiangbin opened this issue Apr 28, 2022 · 9 comments
Labels
A-dev Area: general development experience within Lapce codebase C-perf Category: performance

Comments

@zhaojiangbin
Copy link
Contributor

  1. Start top (or activity monitor in macOS)
  2. Build this commit dd7d3b0
  3. Start lapce and wait for a few seconds
  4. See lapce taking the top spot with CPU at 100%
@zhaojiangbin
Copy link
Contributor Author

Tested the debug build on macOS, intel CPU.

@bugadani
Copy link
Contributor

The debug build generates extremely inefficient code, so this isn't that surprising. Unless you experience this with release mode code, I wouldn't consider this an issue.

@bugadani bugadani added A-dev Area: general development experience within Lapce codebase C-perf Category: performance labels Apr 28, 2022
@bugadani
Copy link
Contributor

Also, you can use the fastdev profile if you need to have better performance in debug. cargo build --profile fastdev

@zhaojiangbin
Copy link
Contributor Author

The debug build generates extremely inefficient code, so this isn't that surprising. Unless you experience this with release mode code, I wouldn't consider this an issue.

Sorry I wasn't clear. It was not CPU spikes.

When it was supposed to be idle (i.e. I wasn't doing anything with lapce after it started up), the process was keeping the CPUs at 100% according to top and activity monitor until I quit the program. The cooling fans of my laptop were running loudly because of this.

The previous commits do not have this problem.

@ttytm
Copy link

ttytm commented May 3, 2022

Same problem with cpu usage going crazy on linux.

Even using a 16 core 4,5ghz each cpu it gets really loud.

@dzhou121
Copy link
Collaborator

dzhou121 commented May 5, 2022

Can you please test the latest master? Previously Lapce scans all the font files at startup which now changed to be lazy loading.

@zhaojiangbin
Copy link
Contributor Author

zhaojiangbin commented May 5, 2022

Can you please test the latest master? Previously Lapce scans all the font files at startup which now changed to be lazy loading.

Yep it is now fixed for me.

@ttytm
Copy link

ttytm commented May 5, 2022

Look good to me too!

@bugadani
Copy link
Contributor

bugadani commented May 5, 2022

Thanks for the feedback. I assume this issue is fixed now, but please feel free to reopen if you experience it again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-dev Area: general development experience within Lapce codebase C-perf Category: performance
Projects
None yet
Development

No branches or pull requests

4 participants