Skip to content
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

Use "pre-cache" for omni-completion in Windows. #2200

Closed
habamax opened this issue Oct 9, 2021 · 7 comments
Closed

Use "pre-cache" for omni-completion in Windows. #2200

habamax opened this issue Oct 9, 2021 · 7 comments

Comments

@habamax
Copy link
Contributor

habamax commented Oct 9, 2021

Is your feature request related to a problem? Please describe it.

Initial or after :VimtexClearCache ALL omni-completion is quite slow in Windows.

Describe the solution you'd like
It would be nice to pre-cache omni-completion values in background job once file is opened.

Describe alternatives you've considered
None.

Additional context
See #2195

@lervag
Copy link
Owner

lervag commented Oct 9, 2021

First, some additional context from #2195:

What do you mean here? "save under other path/name"?

:w ~/docs/anotherpath/anothername.tex then switch to it and do all the same

Does this mean that you only have this particular problem in one path, but not in another path?


You propose a solution for the issue, but I'm not fully convinced that is necessary. And in any case, I would strongly prefer to first fully understand the actual problem. For that, it would be very nice to have a minimal example.

Essentially, this issue is a duplicate of #1885. And I believe the problem is somehow related to a slowness in calling system('kpsewhich ...'). As such, I would be very interested in looking into this more pointedly. To do that, we first need a proper minimal example.

So, I was hoping I could ask you to make a minimal _vimrc file with something lik the following content:

" Either this (proper minimalism)
set nocompatible
set runtimepath^=/path/to/bundle/vimtex
filetype plugin indent on
syntax enable

" Or, if you prefer to use a plugin manager, e.g.
call plug#begin(...)
Plug 'lervag/vimtex'
call plug#end()

" Relevant VimTeX options follow here

And then also a minimal LaTeX example. You could use your current files, but it would be much better to simplify as much as possible. E.g. start with

\documentclass{article}
\usepackage{natbib}

\begin{document}

\cite{xxx}

\bibliography{...}

\end{document}

Of course, adapt the above enough to reproduce the original problem. And finally, please provide the exact necessary steps to reproduce.

@habamax
Copy link
Contributor Author

habamax commented Oct 9, 2021

Does this mean that you only have this particular problem in one path, but not in another path?

I did not test it for many cases, there was only observation that for one "old" tex file it takes longer than for the same content file saved to another folder.

@habamax
Copy link
Contributor Author

habamax commented Oct 9, 2021

You propose a solution for the issue, but I'm not fully convinced that is necessary.

Sure, it was just a guess it might improve UX of windows users but it is no way something I urge you to do :).

And in any case, I would strongly prefer to first fully understand the actual problem. For that, it would be very nice to have a minimal example.

The problem is usual for vim on windows for external process communication. It is the same issue with fugitive which is many times slower on windows.

@habamax
Copy link
Contributor Author

habamax commented Oct 9, 2021

Will try minimal vimrc and minimal latex tomorrow and let you know.

@lervag
Copy link
Owner

lervag commented Oct 9, 2021

Great, thanks. Note, perhaps there is an issue with the paths, e.g. bad handling of paths with spaces or something. It could also explain the delay and why it seems to work in a different path. So it would be worth looking into, I think.

@habamax
Copy link
Contributor Author

habamax commented Jan 25, 2022

Sorry for delllaaaay. :)

I tried it with a minimal document and min vimrc -- initial delay is sub 2 seconds. Maybe 1 second.

Then I tried with my document which has quite a few packages -- it takes about 5-6 seconds (after VimtexClearCache ALL).

So I think this is minor and could be closed.

@habamax habamax closed this as completed Jan 25, 2022
@lervag
Copy link
Owner

lervag commented Jan 25, 2022

Ok, I'm glad to hear you find this to be minor. And since I don't see how to improve this further, I agree we keep this closed for now. If you should ever have a good idea for improving this, feel very free to suggest it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants