Subject: Re: bug#37000: 27.0.50; gc and laggy Emacs

From: Eli Zaretskii <[email-masked]>
Date: Thu, 15 Aug 2019 18:34:43 +0300

> From: Alex Branham <[email-masked]>
> Cc: [email-masked]
> Date: Thu, 15 Aug 2019 09:56:44 -0500
> 
> >> Recently I've noticed Emacs sometimes getting _very_ laggy, as in 
> >> taking up to a half-second to display the a single character that 
> >> I type. M-x profiler-start suggests that garbage-collection is 
> >> taking up too much time (see below my signature for example 
> >> output). gc-cons-percentage and gc-cons-threshold are at their 
> >> default values. I can't figure out how to reproduce this reliably, 
> >> but running M-x relint-directory on the Emacs source tree seems to 
> >> do a decent job triggering it. My Emacs is built from commit 
> >> 4ce9c6d0b58bd77bc811d6c1c5caf955a5a0be2f (~ 4 days ago) of the 
> >> master branch. How can I go about tracking this down?
> >
> > Trying to bisect to find the offending commit would be one way.
> 
> Thanks. I noticed there's some activity around gc on master currently.
> I'll wait for that to pass before trying this.

Unless you happen to set gc-cons-threshold to a large value, that
activity is already over.  And in any case, invoking
garbage-collection manually should "fix" the lagging, if it somehow
related to what we are still discussing.