emacs-devel
[Top][All Lists]
Advanced

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

Re: Indentation and gc


From: Dr. Arne Babenhauserheide
Subject: Re: Indentation and gc
Date: Sat, 11 Mar 2023 14:01:43 +0100
User-agent: mu4e 1.8.13; emacs 28.1

Ihor Radchenko <yantar92@posteo.net> writes:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>>>>>                gc-cons-threshold most-positive-fixnum   ;; Defer Garbage 
>>>>> collection
>>> That's what many people do and many people suggest.
>>
>> And I take every opportunity to tell people not to do.
>
> I am afraid that it is not very helpful. People do not do it only
> because they can, but also because there is a real problem that can be
> solved by this dangerous practice.

Note that I use something similar, but just enlarging to something I
trust my system can handle:

;; Make startup faster by reducing the frequency of garbage
;; collection.  The default is 800 kilobytes.  Measured in bytes.
(setq gc-cons-threshold (* 100 1024 1024))


My system has a few tens of Gigabytes of memory, so running GC if it
finds that it consumes more than 100 MiB does not risk OOM. Algorithms
may depend on garbage collection being active to avoid unbounded memory
usage.

But it causes GC pauses to be much longer — that does not hurt during
init (I don’t interact with Emacs anyway), but it would hurt during
regular usage.

Therefore at the end of the init file this reverts to a more sensible
value for continuous operation:


;; Make gc pauses faster by decreasing the threshold again (from the increased 
initial).
(setq gc-cons-threshold (* 20 1024 1024))


Best wishes,
Arne
-- 
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de

Attachment: signature.asc
Description: PGP signature


reply via email to

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