GNU bug report logs - #49127
Performance degradation in encode_coding_object

Previous Next

Package: emacs;

Reported by: Victor Nawothnig <victor.nawothnig <at> icloud.com>

Date: Sun, 20 Jun 2021 08:19:03 UTC

Severity: normal

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Mattias EngdegÄrd <mattiase <at> acm.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 49127 <at> debbugs.gnu.org, victor.nawothnig <at> icloud.com
Subject: bug#49127: Performance degradation in encode_coding_object
Date: Mon, 16 Aug 2021 20:06:32 +0200
[Message part 1 (text/plain, inline)]
16 aug. 2021 kl. 19.43 skrev Eli Zaretskii <eliz <at> gnu.org>:

>> I don't know how this could ever work. We loop through the markers in the current buffer?
> 
> Yes.  Why do you think this loop is broken?

Because unless I misunderstood the code entirely, the current buffer has nothing to do with the operation at hand.

It's easy to reproduce the original problem: run Emacs in a terminal and make a buffer with many markers. See how the text displays slower with more markers. I've attached a short example; try (make-test-buffer 1000).

The attached patch fixes this problem.

[lus.el (application/octet-stream, attachment)]
[0001-Fix-marker-traversion-in-encode_coding_object.patch (application/octet-stream, attachment)]

This bug report was last modified 3 years and 273 days ago.

Previous Next


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