Skip to content

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

Open
@reimager

Description

@reimager

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions