-
-
Notifications
You must be signed in to change notification settings - Fork 369
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
Wingman gets slow on big modules #1602
Comments
GHC is very slow at typechecking holes. Even if Wingman used stale data, the default ghcide code action handler would still be slow and bottleneck the code action response. You may want to play with the settings we use: haskell-language-server/ghcide/src/Development/IDE/GHC/Compat.hs Lines 204 to 222 in 9c40dcf
|
Let me insist on playing with the settings we use - |
@pepeiborra my understanding is that we currently use the hole fit suggestions to fill in the |
Some of those options, like |
I've had all hole fits turned off globally since 2018 for exactly this performance reason :) |
Was playing around with this today, and typechecking is significantly (and noticeably) faster having disabled the hole fit suggestions. Seeing as they mostly suggest things like |
Was the performance still too bad after disabling |
@anka-213 I just tried that this morning, and the behavior is still wicked slow. After case-splitting a |
Ah, that's too bad! Thanks for testing it! |
@wz1000 and I were discussing on IRC why this is so likely so slow:
Sounds like this functionality in general is anathema to any sort of good performance. As an alternative, I'd be happy to implement the same functionality in Wingman, except rather than suggest anything in scope, it suggests only things defined in the current module, plus a whitelist of other functions from anywhere if they're in scope. What do you think, @anka-213 ? |
I think the feature is most useful for things imported from elsewhere that I didn't realize would fit the hole. For example like this: https://twitter.com/idontgetoutmuch/status/1390258191511007233 So I'm not sure how much that would help. |
How hard would be to improve the performance of hole fit suggestions in GHC? |
I wonder if we could do something similar to what hoogle does to create an index for external libraries? |
@pepeiborra It's tracked here: https://gitlab.haskell.org/ghc/ghc/-/issues/16875 |
Even for things like "refine hole" which should be instant. My guess is that waiting for a fresh type-checking result is to blame. We could probably get away with using stale data instead.
The text was updated successfully, but these errors were encountered: