-
Notifications
You must be signed in to change notification settings - Fork 391
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
Create modern jobs api for simple processes #2195
Conversation
This is now more or less ready for testing. @clason, I would be happy if you could test this on MacOS. I believe it should work more or less exactly as before (you should see no difference), so testing would only be to look for inconsistencies or errors. I would also be glad if anyone could test this on Windows. |
Sure, will check it, @lervag |
regarding #1885, I am experiencing the same delay for initial Other than that it works the same for me. Will continue using it and let you know if there are issues. |
Well, actually, I was hoping that this might resolve the delay, at least in part. :\
That's good to hear, though! Are you on Vim or neovim? |
Another note, after I Tried with another new document it is < 2 seconds. :) Not sure why first time was so long. |
Latest nightly vim (gVim) |
That sounds much better than 30 - 40 seconds. Or do I misunderstand anything? |
Now with cleared cache it is < 2 seconds, all consequent calls are instant. |
How is this compared to the current master branch? Is the master branch still slow (as in O(10) seconds)? |
Current master is about 10 seconds for cleared cache. |
Cool; so, if I understand correctly, this PR should improve the experience for Windows users. I'm pushing another update now, then I'll wait for some more feedback before I merge. This does change an essential part, so I believe it is sensible to avoid rushing the merge... |
I did a brief test, and everything seems to work as intended; I haven't done a proper side-by-side comparison, but it's certainly not slower and quite probably faster! (I'm on an M1 at the moment, so everything feels very snappy already ;)) |
Great, thanks for testing! I don't think it should be much faster, except perhaps on Windows where I've removed some silly hacks. But I hope it will be more robust, and there may be some performance improvements due to more consistent code. |
I'm tempted to merge this. Feel free to dissuade me, I'll wait until later today in any case. |
Use jobstart (neovim) or job_start (Vim) instead of the more "old fashioned" system() and ":!". refer: #2195
Thanks; I've merged this, then. :) |
I've also pushed quite a few updates that further improve on this. I've tested quite thoroughly on my side with neovim and Vim, and I believe things should still work well on MacOS and Windows. However, I am curious to hear feedback on this, especially from the Windows side (@habamax). |
Btw, some very crude benchmarking from my side:
The commands are run inside |
Sorry for being late to the party. I got the email rather late to begin with and was not quite savvy enough with git and Github to download a branch for testing. (I normally just let Vundle handle the updates.) For future reference (so that I can do my part), is the following roughly what I should do?
Thank you, Karl Lervåg , for ever diligent improvements. So far, I haven't noticed much difference in the latest version except perhaps one bug that I've been meaning to report may have already be solved. |
@lervag well, now it takes more time with cleared cache (~ 30 secs) to show the completion for the same document :) But when I save it under other path/name -- it is again "fast enough" I wonder if it is possible to run background job once tex file is loaded to "construct" what is behind that cache. |
No problem!
Yes, more or less. I would do it like this: cd /path/to/vimtex
# e.g. ~/.vim/bundle/vimtex
# Pull latest updates, including all branches
git pull --all
# Checkout the test branch
git checkout <branch>
# Checkout back to master
git checkout master This way, you don't need to work with two copies of the code.
Great, I'm glad to hear this might have solved a bug, and I was not really expecting to hear of any noticable differences. Thank you for testing! And for the kind words :) |
Yes, I was actually sort of expecting this. For some reason, it seems the
What do you mean here? "save under other path/name"?
Perhaps. Could I propose that you again open a new issue for this? I'm sorry about the inconvenience, but I now know much more about what actually happens, and so we could continue the discussion and possibly find a way to fix it. One thing I'm thinking: Are you perhaps using WSL 2? Could it have something to do with the slowness of accessing files outside the linux partition? |
Sure will create it.
Well, that is another issue I might create. For this particular case I have used I also have WSL1 where completion works "instantly", but the issue is that compilation is not working there, vimtex can't find latemxk executable: |
Great, let's continue this discussion there, then. |
NB! This PR is not finished yet and is not ready for testing.
I want to remove the old
process.vim
module and switch it with a newjobs.vim
module that relies on thejobstart
(nvim) andjob_start
(Vim) functions. I believe this may be useful in many cases, and perhaps give a better experience on Windows especially (cf. e.g. #1885).