bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#37321: 27.0.50; Excessive gc in a use case (el-search)


From: Eli Zaretskii
Subject: bug#37321: 27.0.50; Excessive gc in a use case (el-search)
Date: Sat, 14 Sep 2019 11:37:37 +0300

> From: Paul Eggert <eggert@cs.ucla.edu>
> Date: Sat, 14 Sep 2019 01:04:07 -0700
> Cc: 37321@debbugs.gnu.org
> 
>          (gc-cons-percentage 0.8)) ;Why is binding it here more effective 
> than 
> binding it more top-level?
> 
> That binding is not effective in general, because it causes Emacs to do most 
> of 
> its computation with gc-cons-percentage equal to 0.8, but a small amount of 
> it 
> with gc-cons-percentage equal to 0.1 (the default value). This is in an 
> attempt 
> to disable most GC. However, the attempt fails in master because when 
> gc-cons-percentage drops to 0.1 Emacs does a garbage collection pretty much 
> right away. (In Emacs 26, the code lucks out because Emacs happens to not 
> look 
> at gc-cons-percentage during the brief time that it is 0.1, so it doesn't GC.)

Maybe we should have something in NEWS describing the Lisp-visible
effects of the GC changes, perhaps with a couple of practical do's and
dont's regarding GC?

I'm not sure if you are reading Reddit, but it turns out a lot of
Emacs users have GC-related tricks in their init files, and some
unbundled packages even do that as part of their operation, like the
one in question here.  IMNSHO, a large part of this proliferation is
based on blind copying from others without really understanding what
this does, and it reached epidemic proportions.  It might be a good
idea to give users who do care some inside information to allow them
to tune their GC tricks to these changes -- it could lower the number
of bug reports that I'm afraid will follow.

Thanks.





reply via email to

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