-
-
Notifications
You must be signed in to change notification settings - Fork 507
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
Accessing completion attributes is very slow (tensorflow) #1116
Comments
tensorflow. Here we meet again. It's probably going to be a hard one to fix, because this library is just huge. I have ideas, but it's going to take a while. |
@davidhalter does this issue can be resolved? |
Please recheck! It should be way faster for tensorflow now. See my comments in #1195. |
Tested with jedi 0.12.1 and 0.13.0, the original code I posted above takes the same amount of time on two versions (2.35s on my laptop). (It is faster then 5 months ago when I posted but I don't know whether that's due to upgrades of tensorflow or some other factors) |
Ok. |
I didn't really test this and somehow fucked it up. Thanks for testing. I'll probably create a 0.13.1 this evening. cc @hanspinckaers |
Should be working now. If you want you can re-test or wait for the release this evening. |
While completing |
I half agree with you. I tend to agree when it comes to type inference, but completions are kind of a weird thing that should also be fast... I guess I'll wait for feedback, but we might revisit this, if people complain. Also this is just a temporary change and we will hopefully get rid of it in the future. |
There have been three reports on the YCM repository because of commit 23b3327: ycm-core/YouCompleteMe#3291, ycm-core/YouCompleteMe#3322, and ycm-core/YouCompleteMe#3372. I believe this is enough to reconsider the change. |
So are you in favor of removing the hack and of reopening this issue? |
Yes, I am. The other option is to patch Jedi which it's something I'd like to avoid. |
I guess I'm fine with reverting it. Never liked it anyway :) Probably not going to do it in the next few weeks but then. There's quite a big list of things I should be doing (like merging your other PR). |
I just undid the tensorflow speedups. Need different solutions for this, #1059 is probably the way to go. |
BTW: This means that completions take 23s again for intitial ones (previously 1.84s). For repeated completion, it goes down to 0.36s (0.1s previously). |
Finally I slayed the beast. I finally had an idea how to do this. Essentially I just cache some things without properly invalidating them if they change, but since some things never change (especially for installed libraries like numpy/tensorflow), it's save to just cache it. The idea seems simple, but applying it at the right place to keep everything working is a bit harder. I guess therefore I just never had the idea that it was even possible. BenchmarksTensorflow:
Tensorflow completions are now really fast. Numpy:
Note that the initial loading is still horribly slow, but IMO that's not a problem that is extremely annoying, because you could just use something like |
This code takes 6.6s on my laptop.
Removing the line mentioned above, it then goes down to 0.5s.
Any idea on why this happens and how the completion can be made faster?
The text was updated successfully, but these errors were encountered: