From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#71644: 30.0.50; Severe slowdown in larger files with markers beginning in emacs 29+ Date: Thu, 20 Jun 2024 22:04:33 +0300 Message-ID: <86jzijmo5a.fsf@gnu.org> References: <86ed8tozub.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11469"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 71644@debbugs.gnu.org To: Mitchell Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Thu Jun 20 21:05:14 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1sKN5u-0002kz-LE for geb-bug-gnu-emacs@m.gmane-mx.org; Thu, 20 Jun 2024 21:05:14 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1sKN5g-0005tR-QH; Thu, 20 Jun 2024 15:05:00 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKN5f-0005rd-Ci for bug-gnu-emacs@gnu.org; Thu, 20 Jun 2024 15:04:59 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1sKN5f-0000bP-3x for bug-gnu-emacs@gnu.org; Thu, 20 Jun 2024 15:04:59 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1sKN5i-0000vF-Fh for bug-gnu-emacs@gnu.org; Thu, 20 Jun 2024 15:05: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: Thu, 20 Jun 2024 19:05:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 71644 X-GNU-PR-Package: emacs Original-Received: via spool by 71644-submit@debbugs.gnu.org id=B71644.17189102873507 (code B ref 71644); Thu, 20 Jun 2024 19:05:02 +0000 Original-Received: (at 71644) by debbugs.gnu.org; 20 Jun 2024 19:04:47 +0000 Original-Received: from localhost ([127.0.0.1]:40665 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKN5S-0000uT-Rq for submit@debbugs.gnu.org; Thu, 20 Jun 2024 15:04:47 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:45830) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1sKN5R-0000uA-7j for 71644@debbugs.gnu.org; Thu, 20 Jun 2024 15:04:45 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1sKN5H-0000Zh-LM; Thu, 20 Jun 2024 15:04:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=+gOzL+/K0V4fEvwgUvMChViidGJku0nNXNftSADStNo=; b=f5PzIu1bI8eaSCnCLDK5 CeqgyJ3VQBFycesOLGKDkw5I20gwmGH4oDXvdXe3CAeZzbTIVp5zv/NDov+3OIjn2Sc6Kv7J5mAJR 9DAqWn95ht92qZ/O7wHwtsj0M7dRtGjIaTSU0WChjFCGyrvBt17mqN43h1m4hE0pLeQ7gbMplfq4A Bx9baU+1GTUNMx3DXao6FCgrYtn0A4Gx9yBfUboDO6YvGMMJ+mM5cZnedhzor37Fjo3dNV4jpz9Rl xO26pUMvHeF49IaYGG1f9t+kqFPry1qbpRLmWC285pbAzZ3GTMTKHUMS96iDGv2TmRMUzLmNIe28L QXCrIBlGVuy3QA==; In-Reply-To: (message from Mitchell on Thu, 20 Jun 2024 12:57:58 -0600) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:287589 Archived-At: > From: Mitchell > Date: Thu, 20 Jun 2024 12:57:58 -0600 > Cc: 71644@debbugs.gnu.org > > > Why did you decide the problem was due to markers? I see a single > > change in the implementation of markers in Emacs 29 as compared to > > Emacs 28, and no changes at all in Emacs 30 (except one that affects > > the Android, I think). > > I thought it was markers because (1) overwriting a few functions in counsel.el to be the versions at > https://gist.github.com/kings2u/5a8acbf0986f0848be66169d2dba7260 so that counsel-outline cleaned up the > markers it created caused the bug to go away, and (2) the bug also exists when instead of counsel-outline at > Step 5 I used org-refile (with `org-refile-use-cache` is set to `t`), and `org-refile-use-cache` seems to create > many markers in the buffer. But maybe counsel-outline and org-refile are both doing something else that > cause the bug. (FWIW I did also notice that the abbrev expansions were slightly quicker in Step 7 after using > org-refile than after counsel-outline...) If you remove all the non-ASCII characters from the Org file, does the slowdown go away? > > I _can_ reproduce this in Emacs 29.3, where indeed > > expanding any of the two abbrevs takes about 0.5 sec to show on the > > screen. > > Abbrev expansions on my machine take longer. When I re-create the bug with counsel-outline, the abbrevs > take over a second each to expand. Maybe your hardware is faster than mine? Could be, but twice slower sounds too much to be explained by CPU speed. > > I see 3400 markers created by counsel-outline in this case, which is > > not too many, IMO. > > Interesting, maybe it isn’t markers after all. Can I ask how you count markers? I couldn’t find anything in the > docs or online. There's a function count_markers in Emacs, it just isn't compiled unless you compile with -DDEBUG_MARKERS=1. So I compiled it and called it from GDB.