[tex-k] Speed of kpsewhich when querying the repertories of theTeX installation

jfbu jfbu at free.fr
Sat May 2 19:57:23 CEST 2015


Le 2 mai 2015 à 19:30, jfbu <jfbu at free.fr> a écrit :

> 
> Le 2 mai 2015 à 18:13, Akira Kakuto <kakuto at fuk.kindai.ac.jp> a écrit :
> 
>> Hi,
>> 
>>> Although kpsewhich from TL2015 will be six times faster
>>> on Mac OS, it is still frustrating to have perhaps still 75% of the launching time of AUCTeX mode explained by these remaining 3 kpsewhich calls.
>> 
>> If you make your own command kpsevarinfo by replacing
>> cnf.c by cnf2.c, where in cnf2.c kpathsea_init_db (kpse);
>> in the line 250 is omitted,
>> kpsevarinfo -var-value=TEXMFHOME
>> may be about 10 times faster than
>> kpsewhich -var-value=TEXMFHOME
>> 
>>  
>> Best,
>> Akira
>> 
> 
> Thanks, looks promising indeed. Might be exactly what I was asking.
> 
> [...]
> 
> I will report later on timing
> 

Dear Kakuto-san

ttys005:~ (19:50)$ time kpsevarinfo --var-value=TEXMFHOME
/Users/---/Library/texmf

real	0m0.006s
user	0m0.002s
sys	0m0.002s
ttys005:~ (19:50)$ time kpsevarinfo --var-value=TEXMFLOCAL
/usr/local/texlive/texmf-local-2015

real	0m0.006s
user	0m0.002s
sys	0m0.002s

to be compared with

ttys005:~ (19:50)$ time kpsewhich --var-value=TEXMFHOME
/Users/---/Library/texmf

real	0m0.086s
user	0m0.077s
sys	0m0.007s
ttys005:~ (19:51)$ time kpsewhich --var-value=TEXMFLOCAL
/usr/local/texlive/texmf-local-2015

real	0m0.087s
user	0m0.078s
sys	0m0.007s

very promising !

what are the restrictions if any ? by

>> Note that kpsevarinfo may be usable only to obtain
>> information on variables.

do you mean simply that one can no use it for anything else
but querying values of the variables, but that these is
done with full functionality ?

best

Jean-François




More information about the tex-k mailing list