-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
Cache for LaTeX package locations #1430
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great! This seems to work on my end, but I would like to wait for @HannahSchellekens to perform the actual benchmarks :)
Sure. will get to it soon. First need to fix my own stuff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does work. Sort of.
Of course you've got a bigger startup time when opening the IDE. I have a period of ~10 seconds of typing where it is slow. Afterward it is silky smooth.
However, whenever there is a package that is not yet installed, I do get a MikTeX UAC prompt. Which I think is highly undesirable.
This is definitely an improvement though.
@HannahSchellekens Any ideas how we could detect that you have your UAC set to paranoid? Doesn't it go away if you click 'yes' once? |
They do not disappear until you install the package, either by compiling or install by the package manager. This means that you will get approximately 3-5 UAC prompts every second you type for every non included package. A large document of mine produces 13 of such prompts when typing a single letter. I have no clue if it can be detected. I assume it cannot. |
What exactly is the cause of the UAC prompt? Does kpsewhich attempt (on itself) to install the package? |
Did a little test in the terminal, amsmath installed, 12many not installed: It seems that when it is not present, it prompts for an install. Log:
|
I think this is highly undesirable. Anyone with the 'no prompt' package install option enabled in MiKTeX will result in silently installing the package when only opening a document with many uninstalled packages included. I am searching if it is possible to disable auto-install for kpsewhich, but I am not sure if it is possible (also, the fact that it attempts an install on miktex is not documented anywhere) |
That is strange, it must be one of the hidden MiKTeX features, as kpsewhich on TeX Live certainly does not do that. You may also already have found https://tex.stackexchange.com/questions/493692/package-detection-without-installation-in-miktex |
I did not yet come across the SE answer. Any elaborate official documentation I can find on kpsewhich is from TeXLive which indeed does not have this issue (I suppose all packages are already included in the distribution). I am currently looking through the miktex kpsewhich source code (or what it seems to be) to see where exactly the install is triggered and if there is any undocumented way of preventing this. |
My conclusion from the miktex source: Miktex does not provide an actual kpsewhich implementation, but instead emulates its behavior as it already has its own file locating system, implemented as I think that there would be no way of avoiding this when using kpsewhich with miktex. I will at least submit an issue to the miktex project. But for now we need to find an alternative file location method for Windows (this comes painfully close to implementing the LaTeX SDK we have been talking about for years 😄 ). |
Tagging the issue MiKTeX/miktex#548 here for reference (we'll see how it unfolds). |
Well, that was fast! |
Can confirm this works! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UAC prompts are gone and usability concerns are resolved.
Performance is still not there yet, but that requires some more investigation.
Fixes #1424
Summary of additions and changes
How to test this pull request
Have lots of usepackages, I guess