From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Antipov Newsgroups: gmane.emacs.devel Subject: Re: emacs takes exhorbitantly long to read long, one-line files. Date: Mon, 20 May 2013 12:40:58 +0400 Message-ID: <5199E19A.3020503@yandex.ru> References: <87ppwn62yr.fsf@digitalsignallabs.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1369039280 9398 80.91.229.3 (20 May 2013 08:41:20 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 May 2013 08:41:20 +0000 (UTC) Cc: emacs-devel@gnu.org To: Randy Yates Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon May 20 10:41:20 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 1UeLef-0001NR-KT for ged-emacs-devel@m.gmane.org; Mon, 20 May 2013 10:41:17 +0200 Original-Received: from localhost ([::1]:36734 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeLef-00031N-4M for ged-emacs-devel@m.gmane.org; Mon, 20 May 2013 04:41:17 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:55290) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeLeY-00030O-CL for emacs-devel@gnu.org; Mon, 20 May 2013 04:41:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UeLeT-0007RP-6g for emacs-devel@gnu.org; Mon, 20 May 2013 04:41:10 -0400 Original-Received: from forward12.mail.yandex.net ([95.108.130.94]:39313) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UeLeS-0007Q1-R7 for emacs-devel@gnu.org; Mon, 20 May 2013 04:41:05 -0400 Original-Received: from smtp13.mail.yandex.net (smtp13.mail.yandex.net [95.108.130.68]) by forward12.mail.yandex.net (Yandex) with ESMTP id 4B0B1C20B79; Mon, 20 May 2013 12:40:59 +0400 (MSK) Original-Received: from smtp13.mail.yandex.net (localhost [127.0.0.1]) by smtp13.mail.yandex.net (Yandex) with ESMTP id 19299E40798; Mon, 20 May 2013 12:40:59 +0400 (MSK) Original-Received: from unknown (unknown [37.139.80.10]) by smtp13.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 76oTDPgt6e-ewbOqv6Y; Mon, 20 May 2013 12:40:58 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1369039258; bh=8TAUVqP3w5AhLc8ANdK+xE6vXvdBJYjGtgfEajHfVZg=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:Content-Type:Content-Transfer-Encoding; b=kq6HxAje4PlYApk+Mph8/3kvyloVvW4S7lLJ7ImGr1GJuunkgpcCU33zt/L7+gTaB kxRIzKKK3vX/D/PSirX42nWLHHs6ltkZ95H/oMfR6i2/Zt/SFn7pPQ0NswhrmvWV+v ONVNEKobll+fwWvgmeFo83Bt/0kGJG98hcgq/Tqs= Authentication-Results: smtp13.mail.yandex.net; dkim=pass header.i=@yandex.ru User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 In-Reply-To: <87ppwn62yr.fsf@digitalsignallabs.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] [fuzzy] X-Received-From: 95.108.130.94 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:159680 Archived-At: On 05/19/2013 07:52 AM, Randy Yates wrote: > I have a file (a matlab .m file of a vector of data) that is all on > one line and about 2 MB: > > http://www.digitalsignallabs.com/dspin.m > > emacs takes a very long time (6 minutes?) to read this in, and > practically becomes unusable in the mean time. In this particular case, Emacs just thinks that your file is an Objective-C source code, and tries to fontify it accordingly. This attempt implies a lot of buffer scans, and substantial amount of them may be slow for the very long lines. Since I suspect that you don't want to edit this as Obj-C, try: emacs --eval "(setq auto-mode-alist (cons '(\"\\.m\" . fundamental-mode) auto-mode-alist))" dspin.m Dmitry