and "sessionLoading": "multiComponent", the initial load can be incredibly slow, as HLS starts asking for the GhcSession for each module that's currently open in the editor one by one. cabal needs to reconfigure the project each time the set of units to load changes, which can take a non-trivial amount of time on big projects (for example HLS itself).
With a default
hie.yaml
ofand
"sessionLoading": "multiComponent"
, the initial load can be incredibly slow, as HLS starts asking for theGhcSession
for each module that's currently open in the editor one by one.cabal
needs to reconfigure the project each time the set of units to load changes, which can take a non-trivial amount of time on big projects (for example HLS itself).We get logs such as these:
Note, how this takes three minutes.
Potential solution
Load all modules that are currently open immediately if
loadStyle == multiComponent
.