auctex-devel
[Top][All Lists]
Advanced

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

Re: Speeding up AUCTeX's parsing


From: Uwe Brauer
Subject: Re: Speeding up AUCTeX's parsing
Date: Wed, 19 Jul 2023 21:52:02 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux)

>>> "TH" == Tassilo Horn <tsdh@gnu.org> writes:

> Arash Esbati <arash@gnu.org> writes:
> Hi Arash,

>> I was playing with the regexp's in AUCTeX and before coming to the
>> actual thing I wanted to test, I took an arbitraty, not so complex
>> .tex file (around 1180 lines) and eval'ed these two forms:
>> 
>> (let ((gc-cons-threshold 800000))
>> (benchmark-run 15 (TeX-normal-mode)))
>> 
>> (let ((gc-cons-threshold most-positive-fixnum))
>> (benchmark-run 15 (TeX-normal-mode)))
>> 
>> The results are:
>> 
>> (0.984757 13 0.517633)
>> 
>> (0.564401 0 0.0)
>> 
>> Preventing GC has a large impact on parsing.  I'd like to hear from
>> people with large, complex files if they could also run the test on
>> them and report back their findings.

> These are the results with the largest and most complex LaTeX document
> I've ever written:

>   (7.79938455 43 3.516914559)
>   (4.881446238 0 0.0)

>> And is there any major restriction why we shouldn't use this in order
>> to speed up parsing?

> The above effectively forbids gc during parsing and I'm not sure what
> would happen when a very large file is parsed on a system with little
> memory then.  Maybe it would be better to use a gc-cons-percentage value
> of 0.5 or something.  With that, I get

>   (5.124124372000001 6 0.5745011899999923)

> which is not much slower but doesn't forbid gc altogether.

Lately I am using subfiles to divide longer documents in smaller peaces, to 

    1. Avoid such problems

    2. To minimize conflicting edit since my longer Latex documents are
       mostly collaborations (with mercurial)

However I have some 4 files (around 40 pages each) for which I did these
tests and here are the results


(let ((gc-cons-threshold 800000))
    (benchmark-run 15 (TeX-normal-mode)))

1. (5.008039647 10 2.106234047000001)
2. (4.829392651 9 1.9094602939999987)
3. (4.210752047000001 9 1.8714088759999896)
4. (4.473378727 10 2.157265773000006)


(let ((gc-cons-threshold most-positive-fixnum))
    (benchmark-run 15 (TeX-normal-mode))) 

1. (2.7569404370000004 0 0.0)
2. (2.6129024459999997 0 0.0)
3. (2.7114431289999996 0 0.0)
4. (1.6558069629999999 0 0.0)




Uwe 


-- 
Warning: Content may be disturbing to some audiences
I strongly condemn Putin's war of aggression against the Ukraine.
I support to deliver weapons to Ukraine's military. 
I support the NATO membership of the Ukraine.
I support the EU membership of the Ukraine. 
https://addons.thunderbird.net/en-US/thunderbird/addon/gmail-conversation-view/

Attachment: smime.p7s
Description: S/MIME cryptographic signature


reply via email to

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