GNU bug report logs - #16830
[Bug] 24.3.50; massive slow down in forward-line

Previous Next

Package: emacs;

Reported by: "Stefan-W. Hahn" <stefan.hahn <at> s-hahn.de>

Date: Fri, 21 Feb 2014 12:18:01 UTC

Severity: important

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

Bug is archived. No further changes may be made.

Full log


Message #68 received at 16830 <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Antipov <antipov <at> dev.rtsoft.ru>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 16830 <at> debbugs.gnu.org
Subject: Re: Re: bug#16830: [Bug] 24.3.50; massive slow down in forward-line
Date: Mon, 17 Mar 2014 19:05:27 +0400
[Message part 1 (text/plain, inline)]
On 03/10/2014 10:58 PM, Eli Zaretskii wrote:

> It would be nice to be able to turn the cache on and off dynamically,
> depending on the actual line length of the buffer.  I tried to
> implement this, but my naive implementation didn't work well, because
> sampling of the lines tends to be extremely un-representative.  If
> someone can come up with a smarter implementation, please show it.

What if we just maintain the '\n' counter per each buffer text?
With that, finding an average line length is straightforward,
and the very basic implementation looks fairly simple; this
should be helpful in maintaining newline_cache as well.

Dmitry

[nl.patch (text/x-patch, attachment)]

This bug report was last modified 10 years and 336 days ago.

Previous Next


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