-
Notifications
You must be signed in to change notification settings - Fork 72
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
avoid unnecessary O(n^2) work in localuse #768
avoid unnecessary O(n^2) work in localuse #768
Conversation
DCD BUILD FAILED Build statistics: statistics (-before, +after)
client size=1052640 bin/dcd-client
-server size=3102400 bin/dcd-server
-rough build time=65s
+server size=3102144 bin/dcd-server
+rough build time=66s
-DCD run_tests.sh Elapsed (wall clock) time (h:mm:ss or m:ss): 0:08.06
-DCD run_tests.sh Maximum resident set size (kbytes): 42908
+DCD run_tests.sh Elapsed (wall clock) time (h:mm:ss or m:ss): 0:08.10
+DCD run_tests.sh Maximum resident set size (kbytes): 35868
short requests: (240x)
- min request time = 0.013ms
- 10th percentile = 0.138ms
- median time = 0.377ms
- 90th percentile = 0.610ms
- max request time = 1.589ms
+ min request time = 0.012ms
+ 10th percentile = 0.159ms
+ median time = 0.385ms
+ 90th percentile = 0.648ms
+ max request time = 1.649ms
long requests over 10ms: (51x)
- min request time = 12.589ms
- 10th percentile = 13.649ms
- median time = 15.329ms
- 90th percentile = 19.476ms
- max request time = 21.898ms
+ min request time = 13.402ms
+ 10th percentile = 14.791ms
+ median time = 17.070ms
+ 90th percentile = 18.235ms
+ max request time = 22.464ms
top 5 GC sources in server: Full build output
|
ok I guess this fails unit tests, but it works good enough for me locally do with this knowledge what you will |
From what I can see, it's chopping off the first entry. I don't understand why it is doing it (I'm not familiar enough with the codebase to suggest anything), but there should be an easy solution to this problem. |
it looks like locally it shouldn't work at all for you, all the local-use symbols should simply be gone after this. I can add a flag to serve-d to disable this optional feature, it'll be called |
yeah I realized later it's actually kinda completely broken, but ctrl+click to follow a symbol (which also calls localuse) was the thing I was trying to make fast, and that worked locally |
ctrl-click as well as hovering over code should not use localUse, that's using the goto definition / "symbolLocation" CLI flag. I have fixed your code, can you check if everything is still faster for you now? I'd merge this anyway, since it's a nice optimization, but now with the feature actually working again it would be nice to see how long it takes now compared to before. |
welp that's where dcd-server was getting stuck, might be something to look into then also just recompiled with the latest changes, and yeah, the speed-ups are still the same, still takes like 6 seconds to go to a definition in my OpenGL bindings, which took idk how long before the speed-ups, given that I didn't wanna wait more than an hour to find out |
definitely better, but yeah I should probably add a mutex in serve-d so it doesn't run this more than once in parallel and just discards cancelled requests. |
No description provided.