continuous mode: avoid fsync in writing compilation output#1986
continuous mode: avoid fsync in writing compilation output#1986lervag merged 3 commits intolervag:masterfrom
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')
endtryin 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_outputinautoload/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
writefilefunction ins:compiler_jobs.exec(). Maybe is it safer to add theSflag there too?