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: Sun, 4 Sep 2022 06:38:51 +0000
> From: David Holland <>
> On Fri, Sep 02, 2022 at 03:40:07PM +0000, Taylor R Campbell wrote:
>  > 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.
> Won't help (for builds at least) unless there's a way to know to save
> up the duties across pkg_add runs and flush them once when
> everything's done. :-(

pbulk runs a single pkg_add command per build, no?

if [ ! -z "$dependencies" ]; then
	${pkg_add_cmd} $dependencies > ${bulklog}/${pkgname}/depends.log 2>&1 || cleanup

That said, seems reasonable to me for pkg_add to have an option to
just queue up rather than perform cache updates, and then a separate
pkg_* command to perform the queued cache updates.

> (and then also it needs to be able to know that O(n) runs of mktexlsr
> at once are equivalent to just one)

Yes, my idea was to create a keyed cache-update mechanism so that
packages could say `I need to do the INSTALL steps keyed ``mktexlsr'',
which are as follows' and pkg_add gather everything keyed `mktexlsr'
and do it once at the end.

Same mechanism could presumably be reused for updating other caches,
e.g. devel/glib2/files/schemas.tmpl, devel/GConf/files/install.tmpl,
textproc/rarian/files/install-scrollkeeper.tmpl, &c., keyed with
different names.

Correction to previous message: 

>  > 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.

It's not print/kpathsea/INSTALL, but rather
print/kpathsea/files/texmf-install.tmpl (and

Home | Main Index | Thread Index | Old Index