-
-
Notifications
You must be signed in to change notification settings - Fork 661
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
[hxb] load less dependencies during display requests #11650
Conversation
Note that this still loads a lot of dependencies that are not really needed for display requests, but those are harder to skip without breaking everything.
The writer part looks good, this approach should be conservative enough because it captures all types potentially involved in an inferred signature. This manual dependency business seems strangely named at the very least. The one in |
I've probably been too conservative on macro side too.. will check again |
I think the one in Come to think of it, should |
I have to admit this was implemented as a POC, and while I did rework/cleanup other parts, manual deps didn't get that treatment yet. The flag sounds like a good thing to try indeed |
No problem, I actually prefer slightly messy PRs over having a bunch of private branches that solve all problems once they're perfect. |
I'm trying with this: diff --git a/src/core/tType.ml b/src/core/tType.ml
index 30785bb82..2c47a1bb3 100644
--- a/src/core/tType.ml
+++ b/src/core/tType.ml
@@ -401,10 +401,15 @@ and module_def_display = {
mutable m_import_positions : (pos,bool ref) PMap.t;
}
+and module_dep_origin =
+ | MDepTyping
+ | MDepMacro
+
and module_dep = {
md_sign : Digest.t;
md_kind : module_kind;
md_path : path;
+ md_origin : module_dep_origin
} Which sets origin as Not convinced by the naming, but also don't have much inspiration right now... |
Looks ok like that I think. |
Note that this still loads a lot of dependencies that are not really needed for display requests, but those are harder to skip without breaking everything.
This already reduces display requests time by 25~33% on my game project compared to latest dev (
5.0.0-alpha.1+984c6e9
).Edit: on wartales that's a 0.7sec reduction per completion request 😁