auctex
[Top][All Lists]
Advanced

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

Re: [AUCTeX] Long Loading Times


From: Munawar Cheema
Subject: Re: [AUCTeX] Long Loading Times
Date: Thu, 30 Apr 2015 16:40:45 +0100

Hi Jean Francois,

I use the package manger so tried this by starting in completely vanilla mode:
emacs -Q
then I initialize packages manually which is less than a second and then open the tex file which is near instantaneous. 

AUCTeX version 11.88 downloaded from the emacs package manger. (everything is byte-compiled)

Munawar

On Thu, Apr 30, 2015 at 4:27 PM, <address@hidden> wrote:
Send auctex mailing list submissions to
        address@hidden

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.gnu.org/mailman/listinfo/auctex
or, via email, send a message with subject or body 'help' to
        address@hidden

You can reach the person managing the list at
        address@hidden

When replying, please edit your Subject line so it is more specific
than "Re: Contents of auctex digest..."


Today's Topics:

   1. Re: Long loading time (jfbu)
   2. Re: Long loading time (jfbu)
   3. Re: Long loading time (David Kastrup)
   4. Avoiding multiple calls to kpsewhich (jfbu)
   5. Re: Avoiding multiple calls to kpsewhich (jfbu)
   6. Re: Long Loading time (Munawar Cheema)
   7. Re: Long Loading time (jfbu)
   8. Re: Long loading time (Munawar Cheema)


----------------------------------------------------------------------

Message: 1
Date: Thu, 30 Apr 2015 10:40:57 +0200
From: jfbu <address@hidden>
To: address@hidden
Subject: Re: [AUCTeX] Long loading time
Message-ID: <mhspqp$p3p$address@hidden>
Content-Type: text/plain; charset=utf-8; format=flowed

Le 30/04/2015 10:35, David Kastrup a ?crit :
> jfbu <address@hidden> writes:
>
>> Le 30/04/2015 10:09, jfbu a ?crit :
>>> Thu Apr 30 10:04:30 CEST 2015 + kpsewhich --progname latex
>> --expand-path $SYSTEXMF
>>
>> besides, shouldn't all those be
>>
>> kpsewhich --var-value SYSTEXMF
>>
>> etc ... ?
>>
>> indeed for example on my system I don't have any environment variable
>> set relative to the TeX installation ...
>>
>> All the relevant path are all set-up in the  texmf.cnf file
>> from the TeXLive distribution.
>>
>> from http://tug.org/texinfohtml/kpathsea.html#Path-expansion
>>
>> 5.3.2 Variable expansion
>>
>> ?$foo? or ?${foo}? in a path element is replaced by (1) the value of
>> an environment variable ?foo? (if defined); (2) the value of ?foo?
>> from texmf.cnf (if defined); (3) the empty string.
>>
>> But with the syntax
>>
>> kpsewhich --progname latex --expand-path $SYSTEXMF
>>
>> $SYSTEXMF is not there as a path element
>
> If it weren't, your logging program would have had a hard time showing
> its name, wouldn't it?
>

the logging wrapper logged the arguments. When I tried manually
from a Terminal, the shell expanded $SYSTEXMF and it expanded to nil
because I don't have any such environment variable.

Does AUCTeX set up a shell with suitable SYSTEXMF environment variables?

in that case what is the point of the call to kpsewhich?

wrapper:

#!/bin/bash
#
#
OPTIONS="$@"
#
echo "`date` + kpsewhich "$@"" >> /Users/---/Downloads/KPSELOG
#
exec /usr/texbin/kpsewhich "$@"

Jean-Fran?ois




------------------------------

Message: 2
Date: Thu, 30 Apr 2015 10:59:06 +0200
From: jfbu <address@hidden>
To: address@hidden
Subject: Re: [AUCTeX] Long loading time
Message-ID: <mhsqsq$9oo$address@hidden>
Content-Type: text/plain; charset=utf-8; format=flowed

Le 30/04/2015 10:35, David Kastrup a ?crit :
> jfbu <address@hidden> writes:
>
>> Le 30/04/2015 10:09, jfbu a ?crit :
>>> Thu Apr 30 10:04:30 CEST 2015 + kpsewhich --progname latex
>> --expand-path $SYSTEXMF
>>
>> besides, shouldn't all those be
>>
>> kpsewhich --var-value SYSTEXMF
>>
>> etc ... ?
>>
>> indeed for example on my system I don't have any environment variable
>> set relative to the TeX installation ...
>>
>> All the relevant path are all set-up in the  texmf.cnf file
>> from the TeXLive distribution.
>>
>> from http://tug.org/texinfohtml/kpathsea.html#Path-expansion
>>
>> 5.3.2 Variable expansion
>>
>> ?$foo? or ?${foo}? in a path element is replaced by (1) the value of
>> an environment variable ?foo? (if defined); (2) the value of ?foo?
>> from texmf.cnf (if defined); (3) the empty string.
>>
>> But with the syntax
>>
>> kpsewhich --progname latex --expand-path $SYSTEXMF
>>
>> $SYSTEXMF is not there as a path element

sorry about this, I was wrong

>
> If it weren't, your logging program would have had a hard time showing
> its name, wouldn't it?
>


indeed, with a manually done

kpsewhich --progname latex --expand-path '$TEXMFMAIN'

etc...

with quotes to avoid shell expansion it does work.

JF





------------------------------

Message: 3
Date: Thu, 30 Apr 2015 10:59:31 +0200
From: David Kastrup <address@hidden>
To: jfbu <address@hidden>
Cc: address@hidden
Subject: Re: [AUCTeX] Long loading time
Message-ID: <address@hidden>
Content-Type: text/plain; charset=iso-8859-1

jfbu <address@hidden> writes:

> Le 30/04/2015 10:35, David Kastrup a ?crit :
>>
>>> But with the syntax
>>>
>>> kpsewhich --progname latex --expand-path $SYSTEXMF
>>>
>>> $SYSTEXMF is not there as a path element
>>
>> If it weren't, your logging program would have had a hard time showing
>> its name, wouldn't it?
>>
>
> the logging wrapper logged the arguments.

Whatever your logging wrapper was able to see is what kpsewhich got to
see.

> When I tried manually from a Terminal, the shell expanded $SYSTEXMF
> and it expanded to nil because I don't have any such environment
> variable.

So obviously kpsewhich is not called through a shell expanding $SYSTEXMF
or your logging wrapper would not have been able to see the string
$SYSTEXMF.

--
David Kastrup



------------------------------

Message: 4
Date: Thu, 30 Apr 2015 12:22:53 +0200
From: jfbu <address@hidden>
To: address@hidden
Subject: [AUCTeX] Avoiding multiple calls to kpsewhich
Message-ID: <mhsvpt$t82$address@hidden>
Content-Type: text/plain; charset=utf-8; format=flowed

Hi,

although the situation is *much* improved with upcoming
TeXLive 2015, kpsewhich is quite slow for querying paths
on Mac OS X:

texlive 2014:

$ time kpsewhich article.cls
/usr/local/texlive/2014/texmf-dist/tex/latex/base/article.cls

real    0m0.568s
user    0m0.544s
sys     0m0.015s

texlive 2015:

$ time kpsewhich article.cls
/---/TL2015/texmf-dist/tex/latex/base/article.cls

real    0m0.099s
user    0m0.085s
sys     0m0.008s

The situation is the same when one only attempts
to get the installation repertories locations,
(TL2014:)

$ time kpsewhich --var-value TEXMFHOME
/Users/---/Library/texmf

real    0m0.516s
user    0m0.499s
sys     0m0.013s

(It appears that kpsewhich parses completely
various ls-R files even when used only as above
to query the TEXMFHOME repertory.)

During initial load, AUCTeX makes calls to kpsewhich.
(nine such calls with my set-up)

Would it be possible to get TeX-tree-expand
in tex.el to make a single kpsewhich call, and not one for
each passed 'var' of the list

> (defun TeX-tree-expand (vars program &optional subdirs)
>   "Return directories corresponding to the kpathsea variables VARS.
> This is done calling `kpsewhich --expand-path' for each variable.

My question is whether it is possible to arrange TeX-tree-expand
to do rather a single kpsewhich call.

This should be possible as seen from that example:

kpsewhich --progname latex --expand-path '$SYSTEXMF:$TEXMFLOCAL:$TEXMFMAIN:$TEXMFDIST:$TEXMFHOME'

returns

/usr/local/texlive/2014/texmf-var:/usr/local/texlive/texmf-local-2014:/usr/local/texlive/2014/texmf-dist:/usr/local/texlive/texmf-local-2014:/usr/local/texlive/2014/texmf-dist:/usr/local/texlive/2014/texmf-dist:/Users/---/Library/texmf

(notice that SYSTEXMF by itself by default already expands to the
first three in the ouput as one finds
SYSTEXMF = $TEXMFSYSVAR;$TEXMFLOCAL;$TEXMFDIST in the default
texmf.cnf)

I am putting quotes as I am testing this from command line
and must avoid shell expansion of $

The kpsewhich manual is athttp://tug.org/texinfohtml/kpathsea.html :

> 5.5.3 Auxiliary tasks
>
>
> [...]
> ?--expand-path=string? outputs the complete expansion of string, with
> each element separated by the usual path separator on the current
> system (?;? on Windows, ?:? otherwise).
> [...]

I have no idea whether kpsewhich evolved on that point and
assuming the current functionality would break old systems.

Another issue is that during the loading of AUCTeX it appears that
locations TEXMFLOCAL, TEXMFMAIN, TEXMFDIST, TEXMFHOME are each queried
twice. Could this also be avoided ?

A single kpsewhich call rather than 9 would almost divide by 9 the loading
time of AUCTeX on Mac OS X systems (because it appears that most of
this loading time is taken up by the calls to kpsewhich)

Jean-Fran?ois





------------------------------

Message: 5
Date: Thu, 30 Apr 2015 15:17:11 +0200
From: jfbu <address@hidden>
To: address@hidden
Subject: Re: [AUCTeX] Avoiding multiple calls to kpsewhich
Message-ID: <mhta0n$eef$address@hidden>
Content-Type: text/plain; charset=UTF-8

le 30/04/2015 12:22 selon jfbu:
> Hi,
>
> although the situation is *much* improved with upcoming
> TeXLive 2015, kpsewhich is quite slow for querying paths
> on Mac OS X:
>
> texlive 2014:
>
> $ time kpsewhich article.cls
> /usr/local/texlive/2014/texmf-dist/tex/latex/base/article.cls
>
> real    0m0.568s
> user    0m0.544s
> sys    0m0.015s
>
> texlive 2015:
>
> $ time kpsewhich article.cls
> /---/TL2015/texmf-dist/tex/latex/base/article.cls
>
> real    0m0.099s
> user    0m0.085s
> sys    0m0.008s
>
> The situation is the same when one only attempts
> to get the installation repertories locations,
> (TL2014:)
>
> $ time kpsewhich --var-value TEXMFHOME
> /Users/---/Library/texmf
>
> real    0m0.516s
> user    0m0.499s
> sys    0m0.013s
>
> (It appears that kpsewhich parses completely
> various ls-R files even when used only as above
> to query the TEXMFHOME repertory.)
>
> During initial load, AUCTeX makes calls to kpsewhich.
> (nine such calls with my set-up)
>
> Would it be possible to get TeX-tree-expand
> in tex.el to make a single kpsewhich call, and not one for
> each passed 'var' of the list
>
>> (defun TeX-tree-expand (vars program &optional subdirs)
>>   "Return directories corresponding to the kpathsea variables VARS.
>> This is done calling `kpsewhich --expand-path' for each variable.
>
> My question is whether it is possible to arrange TeX-tree-expand
> to do rather a single kpsewhich call.
>
> This should be possible as seen from that example:
>
> kpsewhich --progname latex --expand-path '$SYSTEXMF:$TEXMFLOCAL:$TEXMFMAIN:$TEXMFDIST:$TEXMFHOME'
>
> returns
>
> /usr/local/texlive/2014/texmf-var:/usr/local/texlive/texmf-local-2014:/usr/local/texlive/2014/texmf-dist:/usr/local/texlive/texmf-local-2014:/usr/local/texlive/2014/texmf-dist:/usr/local/texlive/2014/texmf-dist:/Users/---/Library/texmf
>
> (notice that SYSTEXMF by itself by default already expands to the
> first three in the ouput as one finds
> SYSTEXMF = $TEXMFSYSVAR;$TEXMFLOCAL;$TEXMFDIST in the default
> texmf.cnf)
>
> I am putting quotes as I am testing this from command line
> and must avoid shell expansion of $
>
> The kpsewhich manual is athttp://tug.org/texinfohtml/kpathsea.html :
>
>> 5.5.3 Auxiliary tasks
>>
>>
>> [...]
>> ?--expand-path=string? outputs the complete expansion of string, with
>> each element separated by the usual path separator on the current
>> system (?;? on Windows, ?:? otherwise).
>> [...]
>
> I have no idea whether kpsewhich evolved on that point and
> assuming the current functionality would break old systems.
>
> Another issue is that during the loading of AUCTeX it appears that
> locations TEXMFLOCAL, TEXMFMAIN, TEXMFDIST, TEXMFHOME are each queried
> twice. Could this also be avoided ?
>
> A single kpsewhich call rather than 9 would almost divide by 9 the loading
> time of AUCTeX on Mac OS X systems (because it appears that most of
> this loading time is taken up by the calls to kpsewhich)
>
> Jean-Fran?ois
>

On a Linux box with AUCTeX 11.86

Emacs  : GNU Emacs 23.2.1 (i386-redhat-linux-gnu, GTK+ Version 2.20.1)
 of 2010-06-03 on x86-07.phx2.fedoraproject.org
Package: 11.86
AUCTeX-date "2010-02-21"

the behavior is different. First, there is a site-start.el which, it seems,
loads auctex on Emacs launch.

C-h v TeX-macro-global

returns a value even before C-xC-f any foo.tex file

Furthermore during this loading only 2 calls to kpsewhich are made:

jeu. avril 30 15:04:38 CEST 2015 + kpsewhich --progname latex --expand-braces $SYSTEXMF
jeu. avril 30 15:04:38 CEST 2015 + kpsewhich --progname latex --expand-braces $TEXMFHOME

this is to be compared to the 9 calls with AUCTeX 11.88 which I reported
earlier

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


The speed of kpsewhich (from TeXLive 2015) on this Linux box is comparable
to the one on my Mac OS X laptop (with TeXLive 2015)

Best

Jean-Fran?ois








------------------------------

Message: 6
Date: Thu, 30 Apr 2015 16:02:14 +0100
From: Munawar Cheema <address@hidden>
To: address@hidden
Subject: Re: [AUCTeX] Long Loading time
Message-ID:
        <address@hidden>
Content-Type: text/plain; charset="utf-8"

To Jean Francois:
It appears I have a hybrid of TeX Live 2013 with 2014 packages. I will
download both the 2014 and then 2015 pre-release and let you know what I
observe. Thanks for the detailed description of your findings.


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


Munawar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gnu.org/archive/html/auctex/attachments/20150430/5a6ad1ac/attachment.html>

------------------------------

Message: 7
Date: Thu, 30 Apr 2015 17:06:11 +0200
From: jfbu <address@hidden>
To: address@hidden
Subject: Re: [AUCTeX] Long Loading time
Message-ID: <mhtgd3$2jo$address@hidden>
Content-Type: text/plain; charset=windows-1252; format=flowed

Le 30/04/2015 17:02, Munawar Cheema a ?crit :
> To Jean Francois:
> It appears I have a hybrid of TeX Live 2013 with 2014 packages. I will
> download both the 2014 and then 2015 pre-release and let you know what I
> observe. Thanks for the detailed description of your findings.
>
>
>>> To Munawar: what kind of TeX distribution is on your system ?
>
>
> Munawar
>

Hi Munawar,

and are you with AUCTeX 11.88 or earlier ?

it should also matter if the auctex files are included in some
site-start repertory, then the initialization would happen
on launching Emacs rather than on doing C-xC-f a file foo.tex

Jean-Fran?ois





------------------------------

Message: 8
Date: Thu, 30 Apr 2015 16:27:19 +0100
From: Munawar Cheema <address@hidden>
To: address@hidden
Subject: Re: [AUCTeX] Long loading time
Message-ID:
        <address@hidden>
Content-Type: text/plain; charset="utf-8"

Just to be complete: I tried with tex live 2014 but still have no issues
with loading times.
Munawar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gnu.org/archive/html/auctex/attachments/20150430/656440ed/attachment.html>

------------------------------

_______________________________________________
auctex mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/auctex


End of auctex Digest, Vol 122, Issue 12
***************************************



--
Kind Regards
Munawar

reply via email to

[Prev in Thread] Current Thread [Next in Thread]