GNU bug report logs - #78665
31.0.50; Very slow saves

Previous Next

Package: emacs;

Reported by: Stefan Monnier <monnier <at> iro.umontreal.ca>

Date: Sun, 1 Jun 2025 20:08:03 UTC

Severity: normal

Found in version 31.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Full log


View this message in rfc822 format

From: Juri Linkov <juri <at> linkov.net>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: Eli Zaretskii <eliz <at> gnu.org>, Jonas Bernoulli <jonas <at> bernoul.li>, 78665 <at> debbugs.gnu.org
Subject: bug#78665: 31.0.50; Very slow saves
Date: Wed, 04 Jun 2025 20:10:43 +0300
>>> AFAICT the problem is that sometimes this heading is already hidden
>>> (because of a preceding subtree covering the current one), so we end up
>>> going back to the preceding/larger subtree and re-hiding it.  So for
>>> a subtree like that of `;;; Code:` covering N smaller subtrees that were
>>> previously hidden, we end hiding the `;;; Code:` subtree N times (and
>>> each time, this requires looping through all the covered headings),
>>> which introduces an O(N^2) complexity.
>>
>> The patch below seems to fix it (and bug#78673 as well).
>> Juri, comments?
>
> I'm testing it.

I've completed testing your patch and found no problems.




This bug report was last modified 11 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.