[tex-k] Speed of kpsewhich when querying the repertories of the TeX installation
Karl Berry
karl at freefriends.org
Thu Apr 30 23:42:03 CEST 2015
I may write a Makefile which will act after querying
the repertories locations. But one tenth of a second
for each kpsewhich call is a lot.
Save the result instead of making the same call thousands of times. I
don't agree that 100 ms is such a horrible time to do all those
filesystem operations. In fact, it seems rather quick to me.
Could it be imagined to have some kpsewhichdir utility
1) I fail to see how making a utility restricted to a single variable
could speed anything up. Surely what takes the time is looking for the
config files in all the possible directories, and (more so) reading the
ls-R file. If you run kpsewhich --debug=-1 --expand-path=\$TEXMFHOME,
you will see what it's doing.
2) Regardless, the idea of a utility dedicated to a single variable
sounds wrong in principle to me and I don't think it should be done.
the environment variable $TEXMFHOME
So far as I can see, if the envvar is set, its value is already (has
always been) returned "instantly". The lookups are only done if they
need to be.
karl
More information about the tex-k
mailing list