tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: texlive install scripts are unbearably slow



> Date: Fri, 2 Sep 2022 14:44:27 +0100
> From: Jonathan Perkin <jperkin%mnx.io@localhost>
> 
> This has bugged me for a while.  I spend quite a bit of time on pkgsrc 
> performance to make it as fast as possible, but I'm told there's no fix 
> for the fact that texlive-collection-all (a meta package that literally 
> only runs pkg_add) takes nearly 3 hours to build simply due to the 
> texlive install scripts rebuilding various databases.
> 
> Is there really nothing we can do to solve this?  I don't know tex at 
> all, and don't know why these can't be provided by individual packages 
> and combined at install time, or some other caching mechanism.
> 
> If someone can point me to a potential solution I'm more than happy to 
> work on it.

I suspect the main problem is that the INSTALL script builds a cache
that takes O(n) time for n packages, so it takes O(n^2) time overall.
At least part of it, if not all of it, is mktexlsr (rebuilding output
of `ls -R') in print/kpathsea/INSTALL.  There might be something
similar for fonts, or mktexlsr might do that too, not sure.

My idea was to teach pkg_add to batch up the install scripts that do
this kind of caching so that this runs only once at the end.


Home | Main Index | Thread Index | Old Index