From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Prickliness of the "invalid byte code" stuff Date: Tue, 18 Jun 2019 21:44:04 +0300 Message-ID: <83fto6sphn.fsf@gnu.org> References: <87tvcq9b0w.fsf@igel.home> <83v9x2svmf.fsf@gnu.org> Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="168174"; mail-complaints-to="usenet@blaine.gmane.org" Cc: eggert@cs.ucla.edu, rms@gnu.org, emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Jun 18 20:44:45 2019 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hdJ65-000hUw-2P for ged-emacs-devel@m.gmane.org; Tue, 18 Jun 2019 20:44:45 +0200 Original-Received: from localhost ([::1]:32840 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdJ62-0003SR-Vb for ged-emacs-devel@m.gmane.org; Tue, 18 Jun 2019 14:44:42 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:59869) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hdJ5u-0003SD-EO for emacs-devel@gnu.org; Tue, 18 Jun 2019 14:44:36 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:50508) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hdJ5r-0002W4-6f; Tue, 18 Jun 2019 14:44:31 -0400 Original-Received: from [176.228.60.248] (port=3243 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hdJ5i-0006zh-2h; Tue, 18 Jun 2019 14:44:22 -0400 In-reply-to: (message from Stefan Monnier on Tue, 18 Jun 2019 14:11:01 -0400) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 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" Xref: news.gmane.org gmane.emacs.devel:237862 Archived-At: > From: Stefan Monnier > Cc: eggert@cs.ucla.edu, rms@gnu.org, emacs-devel@gnu.org > Date: Tue, 18 Jun 2019 14:11:01 -0400 > > byte-compile-dynamic is a compilation option which makes the .elc file > have the actual bytes of the bytecoded functions lazy-loaded (in the > same way as the docstrings are lazy-loaded: the byte-code-function-p > objects contain in their bytecode field a "pointer" to the > file-and-position so the bytecodes are fecthed on-demand when the > function is called, via `fetch-bytecode`). > > This was introduced at the same time as the lazy loading of docstrings. > > The files using this option are expected to be faster to load (because > we load a bit less into heap). There's also the effect on Emacs memory footprint, right? > The downsides are: > - it doesn't work when the .elc files are compressed. > - it doesn't work when the .elc files are loaded via Tramp. > - If the .elc files is re-generated after the .elc file was loaded, > calling functions from that file typically signal an error (such as > "invalid byte code"). The same problems happen with lazily loading doc strings, right? Or is that different in some way? > A `grep byte-compile-dynamic: **/*.el` seems to indicate it's currently > used in 12 files bundled with Emacs. Any idea why those 12 use it? Thanks.