-
Notifications
You must be signed in to change notification settings - Fork 395
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
continuous mode: avoid fsync in writing compilation output #1986
Conversation
Thanks, this is quite interesting. I'm not so acquinted with |
In any case, I see from |
Hi,
hence without the call to About other possible side effects, I tested already the patch and I can only be happy of it since now vim is much snappier (not to say usable) after saving. |
Yes, I read that part. I am inclined to agree that this change should have no ill side effect, and thus that it should be a very good patch. Thanks! |
But I think there may be more places where it should be applied. If you do a |
I also applied the same patch in |
I'm not sure if everywhere is necessary. But at the similar places of callbacks, and in the corresponding |
yes those are the places I meant by everywhere, but I do not use compilers other than latexmk... |
… to all compilers)
I have just added the "S" flag to try
call writefile([], self.output, 'S')
endtry in s:compiler_nvim.exec().
hence I think that it as safe in neovim as it is in vim. |
…extended to all compilers)" This reverts commit 4658dd8.
I have just reverted the extended changes since in some cases are not relevant (the other compilers do not have continous mode) and in one case (the initial writefile) it is not safe to make it asyncronous. |
Thanks! I've merged this now, and I'll try to keep this in mind if some similar issue should pop up for a different backend. |
ok, thank you very much! |
You're welcome, and thanks for contributing!
tir. 9. mar. 2021, 18:27 skrev Cristiano De Michele <
notifications@github.com>:
… ok, thank you very much!
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#1986 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAHT34V7H27O7VBZYEAPKNTTCZLARANCNFSM4Y3CBZGA>
.
|
in continuous mode (at least in mac osx with vim or macvim or in lubuntu with vim) when a recompilation of latex sources is triggered (e.g. writing the latex file) vim stutters several times (i.e. 3-4 times there are some noticeable lags) and this is rather annoying since I use to save rather frequently my work. The culprit of this odd behavior is the following write inside the function
s:callback_continuous_output
inautoload/vimtex/compiler/latexmk.vim
:since a
fsync()
is invoked after it has been called. This problem can be fixed by adding the "S" flag which prevent a call tofsync()
after writing, i.e. by replacing the above line with:I also noticed a similar call to
writefile
function ins:compiler_jobs.exec()
. Maybe is it safer to add theS
flag there too?