-
-
Notifications
You must be signed in to change notification settings - Fork 877
make pickers not block typing when it is processing (using libuv async handle) #386
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
Conversation
I notified tj. He wanna look at that but if that works that could be huge :) Thank you very much 😄 |
Briefly testing it, I noticed that the |
@clason did you mean it happens on |
@oberblastmeister Thanks! I will try and test soon. @clason sounds like I need to track down this issue anyway :) I can try and figure it out -- I thought we were freeing those results, but maybe we are not. Thanks for testing. |
@oberblastmeister no, it's on You're right that the |
according to #392 (comment) the issue is still present |
utils.async(function() self.previewer:preview( | ||
entry, | ||
status | ||
) | ||
) end)() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wound not do that at all. The buffer previewers are already async and termopen previewer does also not need that.
Edit: yes it also doesn't fix the issue we have with slow tree sitter parsing. Example min.js
file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will probably remove that. I might put stuff that doesn't make sense because I am still testing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah that was an issue that I was finding, rust and markdown files were very slow
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for me though that actually made markdown files preview faster but still not fast
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also tried to make just ts highlighter async. Doesn't do anything because we are just attaching a highlighter which is already super fast and parsing happens not when attaching.
I tried that PR again. It does absolutely nothing for me :|. Run on home dir |
What is not working for you? Is it the typing experience that is freezing or the fact that grepping on home dir will not open? |
Still freezing and i didn't notice any difference to current version. But i also didn't used a stopwatch just my feeling. |
I have a feeling this doesn't do what we think it does :) I'm very busy applying for jobs, but we can try some stuff later. Sorry for the delays :) |
done with new async await strat |
I have made the
on_lines
callback fornvim_buf_attach
async usinguv_async_t
. This has extreme performance benefits even with such a small code change because the cursor can keep moving while telescope is processing. I am usinguv_async_t
instead ofluv_work_ctx_t
orluv_thread_t
because I don't think that the thread ones can change state. In my tests they crash while the async one is fine. We probably still need to make the actual picker faster but making it async is a good step as it makes the user feel like it is going fast.