From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: emacs takes exhorbitantly long to read long, one-line files. Date: Mon, 20 May 2013 18:59:44 +0300 Message-ID: <838v39wsjz.fsf@gnu.org> References: <87ppwn62yr.fsf@digitalsignallabs.com> <5199E19A.3020503@yandex.ru> <877git6hhv.fsf@digitalsignallabs.com> <519A08B2.7010106@yandex.ru> <87r4h1lo20.fsf@kwarm.red-bean.com> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1369070718 23077 80.91.229.3 (20 May 2013 17:25:18 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 May 2013 17:25:18 +0000 (UTC) Cc: dmantipov@yandex.ru, yates@digitalsignallabs.com, emacs-devel@gnu.org To: Karl Fogel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 20 19:25:17 2013 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UeTpk-0003bx-Ed for ged-emacs-devel@m.gmane.org; Mon, 20 May 2013 19:25:16 +0200 Original-Received: from localhost ([::1]:48428 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeTpk-0006jE-03 for ged-emacs-devel@m.gmane.org; Mon, 20 May 2013 13:25:16 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:48021) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeTpf-0006eQ-Lh for emacs-devel@gnu.org; Mon, 20 May 2013 13:25:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UeTIR-0004k7-Ae for emacs-devel@gnu.org; Mon, 20 May 2013 12:50:53 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:50630) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeSVk-0004rw-6T for emacs-devel@gnu.org; Mon, 20 May 2013 12:00:32 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0MN300F00TM6MV00@a-mtaout20.012.net.il> for emacs-devel@gnu.org; Mon, 20 May 2013 18:59:55 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0MN300FI2TRU2SD0@a-mtaout20.012.net.il>; Mon, 20 May 2013 18:59:54 +0300 (IDT) In-reply-to: <87r4h1lo20.fsf@kwarm.red-bean.com> X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 80.179.55.166 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:159691 Archived-At: > From: Karl Fogel > Date: Mon, 20 May 2013 09:32:23 -0500 > Cc: Dmitry Antipov > > Dmitry Antipov writes: > >> I already had that in my init.el. I've also tried creating an empty > >> file and setting it to fundamental-mode. In both these cases the > >> behavior is the same. > > > >Hm...is it the same with emacs -Q? > > > >> I did notice that emacs is faster - but still unusably slow - when > >> toggle-truncate-lines is true. > > > >Try (setq-default cache-long-line-scans t) too. > > That should help a lot. 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?