Le 29/04/2015 23:23, jfbu a écrit :
Le 29/04/2015 23:16, jfbu a écrit :

I don't think AUCTeX does anything like
kpsewhich --var-value=TEXMFHOME
during loading. But if it did, that could explain how
slow things on my system could have gotten 5 times faster.

I am pretty sure however this is irrelevant, except if
Munawar also has (pre) TeXLive2015

WAIT !


I can definitely confirm that on first C-xC-f foo.tex
AUCTeX runs kpsewhich (at least on Mac OS X), doing a prior

sample kpsewhich -wait -mayDie -e

in Terminal

As the Emacs/AUCTeX wait is of about 5 seconds using the TL2014
installation, and as

time kpsewhich article.cls

reports on my TL2014:

real    0m0.523s
user    0m0.504s
sys     0m0.012s

I estimate that at least 5 and perhaps up to 10 calls to kpsewhich
occur during the AUCTeX auto-loads, if it is the only culprit (as
I strongly suspect).

Ah ok, here is what I get from wrapping kpsewhich into a shell script
which does some logging

Thu Apr 30 10:00:10 CEST 2015 + kpsewhich --progname latex --expand-path 
$SYSTEXMF
Thu Apr 30 10:00:11 CEST 2015 + kpsewhich --progname latex --expand-path 
$TEXMFLOCAL
Thu Apr 30 10:00:11 CEST 2015 + kpsewhich --progname latex --expand-path 
$TEXMFMAIN
Thu Apr 30 10:00:12 CEST 2015 + kpsewhich --progname latex --expand-path 
$TEXMFDIST
Thu Apr 30 10:00:12 CEST 2015 + kpsewhich --progname latex --expand-path 
$TEXMFHOME
Thu Apr 30 10:00:13 CEST 2015 + kpsewhich --progname latex --expand-path 
$TEXMFHOME
Thu Apr 30 10:00:13 CEST 2015 + kpsewhich --progname latex --expand-path 
$TEXMFMAIN
Thu Apr 30 10:00:14 CEST 2015 + kpsewhich --progname latex --expand-path 
$TEXMFLOCAL
Thu Apr 30 10:00:14 CEST 2015 + kpsewhich --progname latex --expand-path 
$TEXMFDIST

To illustrate the time difference, here is now what happens
when C-xC-f foo.tex for the first time with Emacs/AUCTeX and
the kpsewhich from TL2015:

Thu Apr 30 10:04:30 CEST 2015 + kpsewhich --progname latex --expand-path 
$SYSTEXMF
Thu Apr 30 10:04:30 CEST 2015 + kpsewhich --progname latex --expand-path 
$TEXMFLOCAL
Thu Apr 30 10:04:30 CEST 2015 + kpsewhich --progname latex --expand-path 
$TEXMFMAIN
Thu Apr 30 10:04:30 CEST 2015 + kpsewhich --progname latex --expand-path 
$TEXMFDIST
Thu Apr 30 10:04:30 CEST 2015 + kpsewhich --progname latex --expand-path 
$TEXMFHOME
Thu Apr 30 10:04:30 CEST 2015 + kpsewhich --progname latex --expand-path 
$TEXMFHOME
Thu Apr 30 10:04:30 CEST 2015 + kpsewhich --progname latex --expand-path 
$TEXMFMAIN
Thu Apr 30 10:04:30 CEST 2015 + kpsewhich --progname latex --expand-path 
$TEXMFLOCAL
Thu Apr 30 10:04:30 CEST 2015 + kpsewhich --progname latex --expand-path 
$TEXMFDIST


I grepped kpsewhich in *.el and see it in:

tex.el:  TeX-tree-expand,  TeX-search-files-kpathsea

(also in some comments of bib-cite.el and indirectly in tex-mik.el)

To Munawar: what kind of TeX distribution is on your system ?

To Tassilo: we see some duplicate kpsewhich calls above. Could there be
a way to do them only once and store the result? This would divide by 2
the loading time of AUCTeX on systems where kpsewhich is slow.

Jean-François




_______________________________________________
auctex mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/auctex

Reply via email to