From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: Re: The Emacs master is much slower than the emacs-27 branch. Date: Fri, 4 Dec 2020 09:19:40 +0000 Message-ID: References: <20201203210919.o3u5u2vkbjtuutiy@Ergus> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38201"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Dec 04 10:20:31 2020 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kl7GQ-0009pf-6F for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Dec 2020 10:20:30 +0100 Original-Received: from localhost ([::1]:41024 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kl7GP-0007FN-8g for ged-emacs-devel@m.gmane-mx.org; Fri, 04 Dec 2020 04:20:29 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39640) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kl7Fk-0006oh-84 for emacs-devel@gnu.org; Fri, 04 Dec 2020 04:19:48 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:48535 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.90_1) (envelope-from ) id 1kl7Ff-0004xc-FF for emacs-devel@gnu.org; Fri, 04 Dec 2020 04:19:46 -0500 Original-Received: (qmail 42435 invoked by uid 3782); 4 Dec 2020 09:19:41 -0000 Original-Received: from acm.muc.de (p4fe158a9.dip0.t-ipconnect.de [79.225.88.169]) by localhost.muc.de (tmda-ofmipd) with ESMTP; Fri, 04 Dec 2020 10:19:41 +0100 Original-Received: (qmail 4298 invoked by uid 1000); 4 Dec 2020 09:19:40 -0000 Content-Disposition: inline In-Reply-To: <20201203210919.o3u5u2vkbjtuutiy@Ergus> X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de Received-SPF: pass client-ip=193.149.48.1; envelope-from=acm@muc.de; helo=mail.muc.de X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:260278 Archived-At: Hello, Ergus. On Thu, Dec 03, 2020 at 22:09:19 +0100, Ergus wrote: > On Thu, Dec 03, 2020 at 06:15:30PM +0000, Alan Mackenzie wrote: > >Hello, Emacs. > >I've got pretty much up to date copies of both the master and the > >emacs-27 branches. > >When I run my customary benchmark (see below) on master's src/xdisp.c in > >master, it's taking around 34s. On emacs-27, it's taking 22s. > >That's a massive slowdown. Does anybody know why this is happening? > >Should I raise a bug report? > >The benchmark I run is this: > >(defmacro time-it (&rest forms) > > "Time the running of a sequence of forms using `float-time'. > >Call like this: \"M-: (time-it (foo ...) (bar ...) ...)\"." > > `(let ((start (float-time))) > > ,@forms > > (- (float-time) start))) > >(defun time-scroll (&optional arg) > > (interactive "P") > > (message "%s" > > (time-it > > (condition-case nil > > (while t > > (if arg (scroll-down) (scroll-up)) > > (sit-for 0)) > > (error nil))))) > >On a freshly loaded buffer, do M-: (time-scroll). > >-- > >Alan Mackenzie (Nuremberg, Germany). > Hi Alan: > I have observed the slowdown, but haven't have time to profile it > properly. Maybe adding to your time-scroll function (profile-start 'cpu) > just before and (profiler-stop) at the end to see the profile-report > could provide useful information. Now that I've reported the problem, I don't see it any more. I just see the 22s timing all the time. Otherwise I would raise the bug report. > The other thing I would check may be to compare the values of gcs-done > in both cases. Thanks! I didn't know about that variable. > Best, > Ergus -- Alan Mackenzie (Nuremberg, Germany).