You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When compiling a table which results in a lot of overfull hbox warnings, vimtex functions are executed for a long time which blocks the editor.
Steps to reproduce
minimal.tex minimal.vim
(Github does not seem to allow uploading files with .tex or .vim extensions, so in the upload the files have an additional .txt extension.)
The only deviation from the default vim/nvim config is having vimtex installed. The example config does this with vim-plug.
nvim -u minimal.vim minimal.tex
:VimtexCompile
Compilation finishes quickly, but vimtex continues executing for a long time before finally the warnings are shown. In the meantime the editor is unusable.
To get a profile of the offending functions:
nvim -u minimal.vim minimal.tex
:profile start ~/profile.log
:profile func *
:profile file *
:VimtexCompile
:profile pause
:qa
less ~/profile.log
/Total time: \+[1-9]
On my system, several functions there run for more than a minute. profile.log
Expected behavior
I expect the warnings to be shown within a sub-second time after compilation is done.
I'm pushing a fix now that improves this for me quite a lot. The issue is that the quickfix parser uses a trick to find the proper filename for the hbox warnings. However, this parsing is not very efficient. With a cache and some further optimizations, I was able to reduce the runtime in your example on my computer from about 27.2 s to 0.3 s. I think that should be sufficient?
Description
When compiling a table which results in a lot of overfull hbox warnings, vimtex functions are executed for a long time which blocks the editor.
Steps to reproduce
minimal.tex
minimal.vim
(Github does not seem to allow uploading files with
.tex
or.vim
extensions, so in the upload the files have an additional.txt
extension.)The only deviation from the default vim/nvim config is having vimtex installed. The example config does this with vim-plug.
nvim -u minimal.vim minimal.tex
:VimtexCompile
To get a profile of the offending functions:
nvim -u minimal.vim minimal.tex
:profile start ~/profile.log
:profile func *
:profile file *
:VimtexCompile
:profile pause
:qa
less ~/profile.log
/Total time: \+[1-9]
On my system, several functions there run for more than a minute.
profile.log
Expected behavior
I expect the warnings to be shown within a sub-second time after compilation is done.
Actual behavior
It takes more than a minute to show the warnings.
Do you use a latexmkrc file?
No
VimtexInfo
The text was updated successfully, but these errors were encountered: