Skip to content

HLS 1.9 seems to do a huge amount of work when multiple units are open and one file is changed #3458

Open
@ocharles

Description

@ocharles

Your environment

NixOS, GHC 9.2.5, Haskell.nix, Helix. hie.yaml is:

cradle:
  cabal:

Steps to reproduce

Open two files in the same cabal.project that belong to different units, I think where the files are somewhat dependent (e.g., A.hs is a dependency of B.hs). Then edit something in A.hs that causes a type error (syntax errors don't seem to be affected) and wait a long time until any error feedback arrives.

Expected behaviour

HLS reports the typo promptly.

Actual behaviour

I've tried to record this happening with asciinema, but it's maybe not immediately obvious. See https://asciinema.org/a/hymieQM8CZY4KkIRnfJERrnwX.

In the first 20s or so I open one file and make some edits to current errors. When I make changes, the error goes away (while type checking happens) and then comes back, pretty swiftly. Next, I open a new file, and then return to the original file. Now making the same edits takes a lot longer. Also notice the status line at the bottom - it starts showing a lot more activity, but I don't really know what it means.

As my session grows, this time gets much much longer, to the point where I find myself waiting upwards of 10/20s just to get any feedback.

Metadata

Metadata

Assignees

No one assigned

    Labels

    performanceIssues about memory consumption, responsiveness, etc.priority: highHigh priority itemtype: bugSomething isn't right: doesn't work as intended, documentation is missing/outdated, etc..

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions