From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Loading souce Elisp faster Date: Mon, 25 Feb 2013 10:19:06 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1361805550 30572 80.91.229.3 (25 Feb 2013 15:19:10 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Feb 2013 15:19:10 +0000 (UTC) Cc: emacs-devel@gnu.org To: Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 25 16:19:33 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 1U9zq0-0002SG-Cm for ged-emacs-devel@m.gmane.org; Mon, 25 Feb 2013 16:19:32 +0100 Original-Received: from localhost ([::1]:55732 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9zpf-0005hi-JR for ged-emacs-devel@m.gmane.org; Mon, 25 Feb 2013 10:19:11 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:40534) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9zpd-0005gt-1U for emacs-devel@gnu.org; Mon, 25 Feb 2013 10:19:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U9zpb-0006gM-TB for emacs-devel@gnu.org; Mon, 25 Feb 2013 10:19:08 -0500 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:18467) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U9zpb-0006g9-Mx; Mon, 25 Feb 2013 10:19:07 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+KLv/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtjRmDcQOIYZwZgV6DFYFI X-IPAS-Result: Av4EABK/CFHO+KLv/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLDiYSFBgNJIgeBsEtjRmDcQOIYZwZgV6DFYFI X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="2401374" Original-Received: from 206-248-162-239.dsl.teksavvy.com (HELO pastel.home) ([206.248.162.239]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 25 Feb 2013 10:19:05 -0500 Original-Received: by pastel.home (Postfix, from userid 20848) id 5D5F26BD7C; Mon, 25 Feb 2013 10:19:06 -0500 (EST) In-Reply-To: (Richard Stallman's message of "Mon, 25 Feb 2013 06:43:43 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 206.248.154.182 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:157318 Archived-At: > It used to be the case that compiling one's .emacs was silly because it > provided no measurable speed difference. But nowadays this is not true > any more: loading a source Elisp file is significantly slower because it > goes through load-with-code-conversion. > Is the slowdown due to heuristically recognizing the encoding? The fast path (used by elc) parses the data straight from the file, whereas the slow path loads the file into a buffer (which includes any decoding if needed) and only then passes the resulting byte-stream to the parser. The difference is definitely noticeable. > Even changing the default might break things for users. Indeed. I think the breakage would be reasonably limited, so I'd be willing to take this risk, but I'd rather avoid having to go to the end of the file looking for a coding: cookie. Stefan