bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#16830: Re: bug#16830: [Bug] 24.3.50; massive slow down in forward-li


From: Dmitry Antipov
Subject: bug#16830: Re: bug#16830: [Bug] 24.3.50; massive slow down in forward-line
Date: Mon, 17 Mar 2014 19:05:27 +0400
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0

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

Attachment: nl.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]