-
-
Notifications
You must be signed in to change notification settings - Fork 389
Initial load of multiple home units is slow with lazy component loading #4381
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
Comments
I suppose, we need a batch loader in hie-bois ? So we can generate deps for all the foi files at once. |
After implementing a demo for batch load mode and play with it, I’ve encountered a significant challenge: it’s difficult to effectively distribute errors when consulting cradles, as we’re batch loading a large number of new files. 🤔 |
Yeah, that makes sense... can't we just display the errors in all files that we failed to load? |
Yes we can, but the cons is a bit high. Pertential workaround would be to load these files one by one when batch load failed. |
… them to improve performance fix haskell#4381
Sorry, it is not clear to me what exactly I should do here? |
That is to add the “sessionLoading”: “multiComponents” in the configuration and if cabal version support it. |
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
.The text was updated successfully, but these errors were encountered: