From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#23928: 25.0.95; Performance regression observable with smartparens Date: Sun, 10 Jul 2016 17:29:27 +0300 Message-ID: <83h9bxftx4.fsf@gnu.org> References: <83wpkug2zs.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1468161028 27497 80.91.229.3 (10 Jul 2016 14:30:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 10 Jul 2016 14:30:28 +0000 (UTC) Cc: npostavs@users.sourceforge.net, 23928@debbugs.gnu.org To: Aaron Jensen Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Jul 10 16:30:18 2016 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1bMFkM-0007X5-8a for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Jul 2016 16:30:14 +0200 Original-Received: from localhost ([::1]:55391 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMFkL-0003RC-C0 for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Jul 2016 10:30:13 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:32973) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMFkB-0003PH-RZ for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2016 10:30:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMFkA-0005aZ-G4 for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2016 10:30:03 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:32882) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMFkA-0005aV-Ci for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2016 10:30:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bMFkA-0006t0-8I for bug-gnu-emacs@gnu.org; Sun, 10 Jul 2016 10:30:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 10 Jul 2016 14:30:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 23928 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: moreinfo Original-Received: via spool by 23928-submit@debbugs.gnu.org id=B23928.146816098226415 (code B ref 23928); Sun, 10 Jul 2016 14:30:02 +0000 Original-Received: (at 23928) by debbugs.gnu.org; 10 Jul 2016 14:29:42 +0000 Original-Received: from localhost ([127.0.0.1]:45219 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMFjq-0006rz-1d for submit@debbugs.gnu.org; Sun, 10 Jul 2016 10:29:42 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41884) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bMFjp-0006ro-AA for 23928@debbugs.gnu.org; Sun, 10 Jul 2016 10:29:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bMFjj-0005XI-2b for 23928@debbugs.gnu.org; Sun, 10 Jul 2016 10:29:36 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:56486) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bMFji-0005X5-VV; Sun, 10 Jul 2016 10:29:34 -0400 Original-Received: from 84.94.185.246.cable.012.net.il ([84.94.185.246]:2836 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bMFjg-0001EX-F7; Sun, 10 Jul 2016 10:29:33 -0400 In-reply-to: (message from Aaron Jensen on Sun, 10 Jul 2016 02:55:31 +0000) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:120749 Archived-At: > From: Aaron Jensen > Date: Sun, 10 Jul 2016 02:55:31 +0000 > Cc: 23928@debbugs.gnu.org > > I’ve added profiles of both here: https://gist.github.com/aaronjensen/a1c2b56eac192b0d9cac76b493822070 > > In this profile, they’re showing pretty much the exact same performance, so that doesn’t tell us much. I believe the performance degradation is something that happens over time, and these are fresh runs of emacs. I’ll have to try and get from 25 next time it slows down on me. Thanks. That rings a bell. The hottest function on these profiles is sp--looking-back, which calls in a loop sp--looking-at, which does this: (defun sp--looking-at (regexp) "Like `looking-at', but always case sensitive." (let ((case-fold-search nil)) (looking-at regexp))) As you will see from bug#18522, binding case-fold-search can be very expensive, especially if you have a lot of buffers. See http://debbugs.gnu.org/cgi/bugreport.cgi?bug=18522#201 for a summary of the findings there. It clearly shows in your profile: sp--looking-at 171 12% let 12 0% As to why you see a slowdown in Emacs 25, I don't know. Maybe you have more buffers crop up there as the session goes on? > One curious thing is that the emacs 24 profile shows all of the builtins (let/if/save-excusion) and the emacs 25 profile does not. Is there something I’m doing wrong that is causing that? Could it be that in Emacs 24 you loaded the library as a .el file, and in Emacs 25 as a .elc file? > I’ll work on this. It seems possible that it will be very hard to track down given the nature—the performance isn’t *always* bad, it just becomes bad at some point in the session. When it becomes bad, count the number of buffers in each session. Bug#18522 provides some tools for that. > And please don't use elp.el to produce profiles, use profiler.el, > because the latter can profile primitives as well. > > I don’t even know how to use elp.el, was there some indication that I was? Sorry, my bad. It looked like elp.el output to me.