emacs-devel
[Top][All Lists]
Advanced

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

Re: Indentation and gc


From: Eli Zaretskii
Subject: Re: Indentation and gc
Date: Sat, 11 Mar 2023 14:37:36 +0200

> From: Ihor Radchenko <yantar92@posteo.net>
> Cc: "Dr. Arne Babenhauserheide" <arne_bab@web.de>, spacibba@aol.com,
>  emacs-devel@gnu.org
> 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?

See my response, where I explain that it is not easy, AFAIU.

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

Adjust how?  If you mean enlarge under some conditions, then please
tell:

  . what are those conditions?
  . should the threshold also go down under some other conditions, and
    if so, how?
  . how to determine the ceiling for increasing the threshold?



reply via email to

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