emacs-devel
[Top][All Lists]
Advanced

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

Re: Indentation and gc


From: Ihor Radchenko
Subject: Re: Indentation and gc
Date: Sat, 11 Mar 2023 10:54:24 +0000

Eli Zaretskii <eliz@gnu.org> writes:

>> ;; Make gc pauses faster by decreasing the threshold again (from the 
>> increased initial).
>> (setq gc-cons-threshold (* 20 1024 1024))
>> ;; original value: 800 000
>> 
>> ;; speed up reading from external processes
>> (setq read-process-output-max (* 1024 1024)) ;; 1mb
>
> This can only be done around specific portions of code known in
> advance to be long and GC-intensive.  I don't think this kind of
> technique can be used in the situation described by the OP.

May it be done when loading init.el and early-init.el?
Init files are commonly known to be resource-intensive. They also tend
to trigger GC more because the heap size is not yet very large and thus
`gc-cons-percentage' does not yet take precedence over `gc-cons-threshold'.

As for "known in advance", may Emacs keep track of how many GCs are
triggered by user commands and then adjust GC dynamically?

-- 
Ihor Radchenko // yantar92,
Org mode contributor,
Learn more about Org mode at <https://orgmode.org/>.
Support Org development at <https://liberapay.com/org-mode>,
or support my work at <https://liberapay.com/yantar92>



reply via email to

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