|
From: | Dmitry Antipov |
Subject: | Re: emacs takes exhorbitantly long to read long, one-line files. |
Date: | Mon, 20 May 2013 20:25:55 +0400 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 |
On 05/20/2013 07:59 PM, Eli Zaretskii wrote:
But it won't succeed to make Emacs usable with such files. E.g., try this: M-> C-p and count the seconds it takes to perform the second command. What Emacs does behind the scenes is go to the beginning of the previous _physical_ line (which is quite fast in this case), and the go all the way down the humongously long line, one character at a time, until it finds the place to put the cursor. Unless we make radical changes in this algorithm, how can anyone expect reasonable performance from this?
This is pretty ugly because both previous-line and next-line uses Fforward_line, which uses scan_newline, which _does not_ use newline cache :-(. Due to the above, I believe that the use of scan_newline should be limited to *Messages* buffer tricks, and other users should be converted to use find_newline instead. Dmitry
[Prev in Thread] | Current Thread | [Next in Thread] |