unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Alexander Shukaev <emacs@Alexander.Shukaev.name>
To: Noam Postavsky <npostavs@users.sourceforge.net>,
	Eli Zaretskii <eliz@gnu.org>
Cc: 29095@debbugs.gnu.org
Subject: bug#29095: Bug: The '20a09de953f437109a098fa8c4d380663d921481' merge increased my Emacs configuration loading time from 9 s to 60 s
Date: Thu, 2 Nov 2017 00:49:28 +0100	[thread overview]
Message-ID: <d633ff32-ea4c-659b-52a0-033a6a4042e3@Alexander.Shukaev.name> (raw)
In-Reply-To: <87h8ueaioy.fsf@users.sourceforge.net>

On 11/01/2017 02:31 AM, Noam Postavsky wrote:
> tags 29095 + moreinfo
> quit
> 
> Alexander Shukaev <emacs@Alexander.Shukaev.name> writes:
> 
>> Hi,
>>
>> Decided to try pretest of 26.0.90 and immediately discovered that it
>> is slower than, for example,
>> 'e7f65187580342171dd9ad32e570c50c96badb13' which I used before.  In
>> particular, thanks to a couple of hours of bisecting, I found that the
>> '20a09de953f437109a098fa8c4d380663d921481' merge increased my Emacs
>> configuration loading time from 9 s to 60 s, which is unacceptable.
> 
> I know what you mean by "which is unacceptable", but somehow on first
> reading it strikes me as rather bossy and entitled.

Apologies, didn't want it to sound like that.  Was truly frustrated by 
the experience.  The problem was also that until the very last moment I 
refused to believe that I would really hit something like this on a 
"pretest" tag from the 'master' branch.  I did OS upgrade recently as 
well, so I first started to profile my SSD RAID for possible performance 
degradation (as Emacs reads lots of file at startup) and look for any 
issues I could have introduced in the custom Linux kernel.  I rolled 
back Emacs only as the very last resort and to my (unpleasant) surprise 
that was the culprit.

>> I have no idea how this made it's way to the 'master' branch.
> 
> This sentence kind of suggests you think that the 'master' branch is
> supposed to be the most stable, but it's rather emacs-26 (being the
> release branch) which is intended to be more stable.  Note that
> e7f6518758 which you said is okay, is contained in both emacs-26 and
> master.

As my original findings (namely merge commit from the 'emacs-26' branch) 
demonstrated, there is no stable branch at the moment as the faulty 
commit is now present in both.  In fact, the 'emacs-26' was merged to 
master (and not vice versa), so it's the issue that came from what you 
call a "stable" branch.  This is another surprise for me.

>> Furthermore, other operations like navigation across windows or
>> performing an incremental search are also noticeably slower, i.e. they
>> stutter annoyingly, and from what I see is a result of extensive GC
>> spam which did not occur in previous versions.  Looks like something
>> core has really been changed and potentially broken.  This needs
>> investigation; let me know what can I do for you guys from my side.
>> Thanks.
> 
> I see two possible directions to investigate:
> 
> 1. You bisect farther along the emacs-26 branch, as a merge commit
> collects a whole bunch of changes, and so doesn't really narrow things
> down at all.

And that's what I just finished doing, voilà:

e1f6e3127a292e6ba66d27c49ddda4fe949569f5
Author:     Noam Postavsky
AuthorDate: Wed Aug 30 23:12:22 2017 -0400
Commit:     Noam Postavsky
CommitDate: Fri Sep 29 18:40:06 2017 -0400

And yes, of course, as soon as I found this by spending a couple of 
hours more doing bisecting, I did immediately set 
`x-wait-for-event-timeout' to nil and the startup problem was gone. 
However, I'm still gravely concerned that such defaults (100 ms GUI 
delays) suddenly get added (whatever the reason for this new option was) 
and affect both branches.

Now, that was only the first part.  I'm still going to continue 
bisecting further why there are new obvious issues with garbage 
collecting (as those seem to be somewhere deeper in the 'emacs-26' 
branch).  For instance, while I was doing bisecting for the above 
finding, I kept rebuilding the Emacs package from scratch in a clean 
environment and I did so using `compilation-mode'.  As the output from 
the build kept arriving to the *compilation* buffer, I kept getting 
"Garbage collecting...done" spam (at random times), stuttering the 
output coming into *compilation* buffer.  You don't have to explain to 
me here anything about GC, I am well aware of all of these issues.  The 
point is that such frequent GC spam and stuttering of output did not 
happen before and I didn't change GC settings.  Now, this is not even 
the most irritating about this, it's rather that frequently it happens 
so that "Garbage collecting...done" would just hang out there and the 
build output would stop completely, in fact, the whole Emacs is blocked 
waiting for something to happen from GC but either that GC either hangs 
itself or it takes too long that I lose my patience.  What I had to do 
in such cases, is simply spam <C-g> just so that Emacs aborts those 
faulty GC attempts, unblocks, and I can finally see my build output 
being aggressively flushed into the *compilation* buffer (as the build 
is in reality already much further away from the point where the output 
stopped).

Regards,
Alexander





  reply	other threads:[~2017-11-01 23:49 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-01  0:44 bug#29095: Bug: The '20a09de953f437109a098fa8c4d380663d921481' merge increased my Emacs configuration loading time from 9 s to 60 s Alexander Shukaev
2017-11-01  1:31 ` Noam Postavsky
2017-11-01 23:49   ` Alexander Shukaev [this message]
2017-11-02  0:21     ` Noam Postavsky
2017-11-04 23:28       ` Alexander Shukaev
2017-11-04 23:53         ` Noam Postavsky
2017-11-04 23:58           ` Alexander Shukaev
2017-11-05 10:53           ` martin rudalics
2017-11-07  9:10             ` Noam Postavsky
2017-11-07 12:57               ` Noam Postavsky
2017-11-08  7:13               ` martin rudalics
2017-11-08 13:42                 ` Noam Postavsky
2017-11-09  7:28                   ` martin rudalics
2017-11-09 13:20                     ` Noam Postavsky
2017-11-09 18:12                       ` martin rudalics
2017-11-09 22:09                         ` Alexander Shukaev
2017-11-09 22:22                           ` Alexander Shukaev
2017-11-10  0:53                           ` Noam Postavsky
2019-04-23  2:52                             ` Noam Postavsky
2017-11-12 10:09                           ` martin rudalics
2017-11-08  7:13               ` martin rudalics
2017-11-01  3:44 ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=d633ff32-ea4c-659b-52a0-033a6a4042e3@Alexander.Shukaev.name \
    --to=emacs@alexander.shukaev.name \
    --cc=29095@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=npostavs@users.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).