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

significant performance loss with lsp-dart-flutter-widget-guides #178

Open
reimager opened this issue Sep 6, 2022 · 3 comments
Open

significant performance loss with lsp-dart-flutter-widget-guides #178

reimager opened this issue Sep 6, 2022 · 3 comments

Comments

@reimager
Copy link

reimager commented Sep 6, 2022

This is an FYI in case others run into this issue. My lsp-dart performance was pretty terrible.

I was testing by just going into a dart file and typing a comment and mashing buttons.
Something like:
// aoeuao eaosethaosenuthaosneuhtaosueh aoeuaoeusnthaosh

There is a noticeable lag for characters to appear, sometimes several seconds.
I can hear my CPU fans spin up as emacs takes 100% CPU.

I tried every version of everything as the cpu profile kept sending me in odd directions.
Currently running emacs29, with native compilation, with plists for LSP, with json native libraries, and all the other stuff to maximize LSP performance.
Also tried emacs27 without native compilation.
Also tried with/without other stuff that I thought might be related: lsp-ui, helm, projectile, themes, company, etc

I finally figure out that I just need to:

(setq lsp-dart-flutter-widget-guides nil)

and the problem completely disappears.

lsp-version:
LSP :: lsp-mode 8.0.0, Emacs 29.0.50, gnu/linux

lsp-dart-version:
[LSP Dart] 1.22.2 at 2022.09.06 @ Emacs 29.0.50
[Dart SDK] Dart SDK version: 2.18.0 (stable) (Unknown timestamp) on "linux_x64"

lsp-doctor:
Checking for Native JSON support: OK
Check emacs supports read-process-output-max': OK Check read-process-output-max' default has been changed from 4k: OK
Byte compiled against Native JSON (recompile lsp-mode if failing when Native JSON available): OK
`gc-cons-threshold' increased?: OK
Using gccemacs with emacs lisp native compilation (https://akrl.sdf.org/gccemacs.html): OK

@ericdallo
Copy link
Member

Thanks, to be honest I thought we solved every performance issue on that feature as we had lots of performance in the past, I work on big flutter projects and didn't notice that, but if there is anything we could fix it'd be nice

@gnumonk
Copy link

gnumonk commented Sep 27, 2022

+1 , (setq lsp-dart-flutter-widget-guides nil) setting up this is helping, else flutter with emacs was stuck and very slow.

@ashwinp15
Copy link

So, is there any plan of performance optimisation for the lsp-dart-flutter-widget-guides feature?

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

No branches or pull requests

4 participants