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#14786: 24.3.50; `field-end' is now very slow Date: Fri, 05 Jul 2013 19:01:17 +0300 Message-ID: <8338rtyp0y.fsf@gnu.org> References: <029969a6-cd0e-45c9-b778-57b5daf98c2a@default> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1373040190 12979 80.91.229.3 (5 Jul 2013 16:03:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 5 Jul 2013 16:03:10 +0000 (UTC) Cc: 14786@debbugs.gnu.org To: Drew Adams Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 05 18:03:10 2013 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 1Uv8TV-0005ai-CD for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Jul 2013 18:03:09 +0200 Original-Received: from localhost ([::1]:33623 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uv8TU-0001Ct-Aj for geb-bug-gnu-emacs@m.gmane.org; Fri, 05 Jul 2013 12:03:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:48991) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uv8TR-00018S-4M for bug-gnu-emacs@gnu.org; Fri, 05 Jul 2013 12:03:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uv8TP-0003Fz-O9 for bug-gnu-emacs@gnu.org; Fri, 05 Jul 2013 12:03:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37940) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uv8TP-0003Ft-JK for bug-gnu-emacs@gnu.org; Fri, 05 Jul 2013 12:03:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Uv8TO-0003bA-Hm for bug-gnu-emacs@gnu.org; Fri, 05 Jul 2013 12:03: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: Fri, 05 Jul 2013 16:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 14786 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 14786-submit@debbugs.gnu.org id=B14786.137304012813696 (code B ref 14786); Fri, 05 Jul 2013 16:03:02 +0000 Original-Received: (at 14786) by debbugs.gnu.org; 5 Jul 2013 16:02:08 +0000 Original-Received: from localhost ([127.0.0.1]:60488 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Uv8ST-0003Yf-Up for submit@debbugs.gnu.org; Fri, 05 Jul 2013 12:02:07 -0400 Original-Received: from mtaout21.012.net.il ([80.179.55.169]:47529) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Uv8SQ-0003XW-Bs for 14786@debbugs.gnu.org; Fri, 05 Jul 2013 12:02:04 -0400 Original-Received: from conversion-daemon.a-mtaout21.012.net.il by a-mtaout21.012.net.il (HyperSendmail v2007.08) id <0MPH00M000ERJO00@a-mtaout21.012.net.il> for 14786@debbugs.gnu.org; Fri, 05 Jul 2013 19:01:22 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout21.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MPH00MIE0I9DJD0@a-mtaout21.012.net.il>; Fri, 05 Jul 2013 19:01:21 +0300 (IDT) In-reply-to: <029969a6-cd0e-45c9-b778-57b5daf98c2a@default> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.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-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:75956 Archived-At: > Date: Thu, 4 Jul 2013 13:57:52 -0700 (PDT) > From: Drew Adams > Cc: 14786@debbugs.gnu.org > > 1. emacs -Q > > 2. Load library dired-details.el, from Emacs Wiki: > http://www.emacswiki.org/emacs/download/dired-details.el > > 3. C-x d ; in some directory that has lots of files > > 4. M-x dired-details-toggle > > 5. M-x dired-details-toggle ; (optional, so you see all info) > > 6. Position the cursor on a file or dir name near the beginning of > the list. > > 7. M-: (field-end nil) > > The result appears after a few seconds (I'm guessing about 4 sec > in the directory I used). > > Do the same thing in previous Emacs versions (including as recent > as 24.3, at least), and the result appears immediately. Not exactly immediately, but approximately 4 to 5 times faster. The problem is that dired-details floods the Dired buffer with overlays. When there are so many overlays, searching for an end of a non-existent property takes a lot of time, because Emacs needs to examine every overlay in the buffer. What happened between Emacs 24.3 and the current trunk is that the call GET_OVERLAYS_AT (XINT (position), overlay_vec, noverlays, NULL, 0); in get_char_property_and_overlay got roughly 4 to 5 times slower. I don't know why this slowdown happened, but it just moved the time needed by field-end from below the annoyance threshold to well above it. If someone can find out why GET_OVERLAYS_AT is now slower, we could see if that could be fixed. But it's quite possible that the change which caused that fixed some bug that we don't want to re-introduce. In any case, I think having so many overlays in a buffer is asking for trouble.