-
Notifications
You must be signed in to change notification settings - Fork 21
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
Make EasyClip load on-demand using vim-plug #87
Comments
I don't know if it's possible at all, as there may be a |
We might be able to make it load more lazily - right now it does just load everything on startup. I'd be curious to learn which parts are taking the most time, if you do end up doing some profiling please share. Unfortunately I don't have time right now to do much work here as much as I would like to help |
Look at this:
and this:
and this:
First one obviously is related to loading the yanks list from file, others seems to be related to that huge list too. I guess if we could manage to make it lazy load the list of yanks from file or use nvim's async feature it'd solve the load time problem. |
Ah yes - not surprising that loading the shared yanks to/from file is the issue. For some reason I assumed that you had that off (which is the default). Do you have I'm not sure you can lazy load that list of yanks very easily, since the user could access it directly through registers (rather than through paste / yank / move commands). Also, I'm not sure it would really be worth it anyway since you would need to have it loaded pretty quickly anyway, unless you're using Vim just for reading text and not actually changing or yanking anything. Using nvim to load/save in the background might make sense though |
I see. I thought maybe there's a tiny mistake somewhere that's making it take too long, but now I think it doesn't worth to lazy load it too. I think I can reduce |
I second doing this, or something else to cut the load time. Easyclip is almost 1/3 of my load time, and I have 178 (!) plugins. |
@alok have you considered reducing |
It's only 50. Would making it 0 bypass all the yank related code?
|
Do you have |
Yes
|
That is likely the reason why you have the lag. Can you try setting that to 0 and seeing if it is any faster? The shared yanks functionality works by saving and reloading from file, so it can be slow. It would be nice to do that in a more lazy way if that is indeed the cause of the lag |
That made a big difference (~ 85 ms). If it was done lazily, I'd be pretty enthusiastic. |
I'm trying to optimize my vim's startup time. Investigating load time of different plugins I found that EasyClip is taking around 150ms to load. The only plugin that used more time was YouCompleteMe and it took around .5s. I was able to make YCM load on demand using the instructions on vim-plug (making YCM on-demand is an example of on-demand feature of vim-plug.) I thought it'd be great if I could make EasyClip load only when I issue a yank or paste command. Could you please provide some instructions for this purpose?
The text was updated successfully, but these errors were encountered: