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: Tassilo Horn
Subject: Re: Speeding up AUCTeX's parsing
Date: Thu, 20 Jul 2023 09:39:34 +0200
User-agent: mu4e 1.11.10; emacs 30.0.50

Arash Esbati <arash@gnu.org> writes:

Hi Arash,

>> 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.
>
> `gc-cons-percentage' was next on my list.  What Do you think about a
> change like this:
>
> --8<---------------cut here---------------start------------->8---
> (defun TeX-normal-mode (&optional arg)
>   "Remove all information about this buffer, and apply the style hooks again.
> Save buffer first including style information.
> With optional argument ARG, also reload the style hooks."
>   (interactive "*P")
>   (if arg
>       (dolist (var TeX-normal-mode-reset-list)
>         (set var nil)))
>   (let ((gc-cons-percentage 0.5)) ;;; <==== Line added!
>     (let ((TeX-auto-save t))
>       (if (buffer-modified-p)
>           (save-buffer)
>         (TeX-auto-write)))
>     (normal-mode)
>     ;; See also addition to `find-file-hook' in 
> `VirTeX-common-initialization'.
>     (when (eq TeX-master 'shared) (TeX-master-file nil nil t))
>     (TeX-update-style t))  )
> --8<---------------cut here---------------end--------------->8---

Yes, that should be alright.

Bye,
Tassilo



reply via email to

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