-
Notifications
You must be signed in to change notification settings - Fork 467
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
fix(lazy): modify lazy events to improve perf #734
Conversation
In fact, these plugins are "loaded on-demand". See #502 and |
Yes, but these plugins only is needed in code files and other text buffers. I think it may be better load in buffer events. 🤔 |
That's true, but it will significantly increase the "user-perceived" startup time, especially in the case of directly opening a file for editing (b/c many events are called simultaneously). |
Got it |
I'm still wonder why the |
@Saafo b/c |
I'm trying The former seems work fine, but the later is quite odd. I order the time line in (but it seems work fine? since the highlight is disabled and the |
@Saafo This might be a bit difficult to explain, but let me clarify that: The root cause of the problems u encounter is you can't control the order of invocation of different callbacks registered under the same event during resource competition (obviously we do not have anything like btw, |
Got it! Thanks very much for the detailed explanation! |
The current lazy events for
Comment
,vim-illuminate
andtreesitter
are so early that actually they do not do anything at that time.This PR changed the lazy events to
BufReadPost
andBufNewFile
to let them load when there is a new buffer.Before: about 70ms
After (
bigfile
enabled):After (
bigfile
disabled):*
bigfile
requirestreesitter