From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Karl Fogel Newsgroups: gmane.emacs.devel Subject: Re: emacs takes exhorbitantly long to read long, one-line files. Date: Mon, 20 May 2013 09:32:23 -0500 Message-ID: <87r4h1lo20.fsf@kwarm.red-bean.com> References: <87ppwn62yr.fsf@digitalsignallabs.com> <5199E19A.3020503@yandex.ru> <877git6hhv.fsf@digitalsignallabs.com> <519A08B2.7010106@yandex.ru> Reply-To: Karl Fogel NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1369060360 3478 80.91.229.3 (20 May 2013 14:32:40 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 May 2013 14:32:40 +0000 (UTC) Cc: Dmitry Antipov To: Randy Yates , emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 20 16:32:39 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 1UeR8h-0004UU-LB for ged-emacs-devel@m.gmane.org; Mon, 20 May 2013 16:32:39 +0200 Original-Received: from localhost ([::1]:45571 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeR8h-0002Wd-8N for ged-emacs-devel@m.gmane.org; Mon, 20 May 2013 10:32:39 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43451) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeR8b-0002WI-ST for emacs-devel@gnu.org; Mon, 20 May 2013 10:32:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UeR8V-0004ST-3X for emacs-devel@gnu.org; Mon, 20 May 2013 10:32:33 -0400 Original-Received: from mail-ie0-x22b.google.com ([2607:f8b0:4001:c03::22b]:45992) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeR8U-0004Rr-VL for emacs-devel@gnu.org; Mon, 20 May 2013 10:32:27 -0400 Original-Received: by mail-ie0-f171.google.com with SMTP id e11so14023818iej.30 for ; Mon, 20 May 2013 07:32:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:cc:subject:references:reply-to:date :in-reply-to:message-id:user-agent:mime-version:content-type; bh=u8R3Vq2dCptCp4HL95Bw+7MkWNxkqJKZoem5dtvaAVs=; b=BEuf4u/x5MbrA2vTOHXEz961rl/jJYcBx0kB8cVxKOb8DPECrudqjSY+xZW6+45208 671vVPBDNz9TAzqhpio7It8RzSjySguuRlwVICIT1ORwQ5B/fP6G+9/NcMP6xZA5WP87 VMtJi/awzdakcq1Dt0QVbIfA1ekQ5BvHCUqVNT2vvjzoCP0y84QDA67OUq9UVH0E6nlL 2/dhyTmTB+mA2Zw2utw9cVQVFO59/W1wCV9VuLLnmvYLLcyA6Iou8Y5SZnVpKcqalITp mNlDzC4jqtPPkIhxx1T2Q0xGU/0b/sARdcCVCthsuk8EuukIUlB9iP8k7LENq7PVI6kL rYgQ== X-Received: by 10.50.67.10 with SMTP id j10mr5421936igt.70.1369060345451; Mon, 20 May 2013 07:32:25 -0700 (PDT) Original-Received: from kwarm.red-bean.com (74-92-190-113-Illinois.hfc.comcastbusiness.net. [74.92.190.113]) by mx.google.com with ESMTPSA id np6sm164790igb.0.2013.05.20.07.32.24 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 20 May 2013 07:32:24 -0700 (PDT) In-Reply-To: <519A08B2.7010106@yandex.ru> (Dmitry Antipov's message of "Mon, 20 May 2013 15:27:46 +0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c03::22b 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:159685 Archived-At: 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. If there are any other tricks for making Emacs behave better with long lines, you might be able to find them in the Ale source code, which is reachable from http://red-bean.com/ale/ . Ale is a genetic sequence alignment editor written in Emacs. Each line a buffer represents one organism's sequence, e.g. a ribosomal RNA sequence, so can easily be 2MB or more in length. cache-long-line-scans was in fact added partly to support this, IIRC; there may be other tricks in the Ale source code (I don't remember after all these years), so it might be worth a look. -K