From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Lisp files that load cl-lib in problematical ways Date: Thu, 26 Oct 2023 08:16:52 +0300 Message-ID: <835y2uhsjf.fsf@gnu.org> References: <87il8betof.fsf@dataswamp.org> <83fs3dgxv8.fsf@gnu.org> <835y38qvlg.fsf@gnu.org> <87bkcx6eci.fsf@dataswamp.org> <8734y7p7sz.fsf@dataswamp.org> <83v8b3mcuj.fsf@gnu.org> <87jzrjvze8.fsf@gmx.net> <83r0lrm4gj.fsf@gnu.org> <83edhqu2bj.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="24568"; mail-complaints-to="usenet@ciao.gmane.io" Cc: stephen.berman@gmx.net, incal@dataswamp.org, emacs-devel@gnu.org To: Andrea Corallo Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 26 07:17:48 2023 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1qvskd-0006Bz-T8 for ged-emacs-devel@m.gmane-mx.org; Thu, 26 Oct 2023 07:17:47 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qvsjg-0000M2-VE; Thu, 26 Oct 2023 01:16:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qvsjf-0000H7-GQ for emacs-devel@gnu.org; Thu, 26 Oct 2023 01:16:47 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qvsje-00038V-1P; Thu, 26 Oct 2023 01:16:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=1QisIKRHNqlvdbGXceV4nRwiBKeHqs2AzCeumlcIchM=; b=RxFzcHoOB6Ca g9MgI7FjLv6Sixc81KYF3BvFEqvyFiUtNU6ACdYNVOwHQqMphttebbX4fx281vNyHBBELxPGq7xQW mrcwpcNQ0FONsmtNdBLMNC2A+F1BvHKDUWZP187uD4dgGAAjRefoHd2RXl1+vrlpeAplhsSNnBJjH RTrcrOEEmSfQAvn2yuoFr8bgZ7iOqwhpBZXUJcSBmxEG5ZPiuwYBdlRbStk9q1aurjRhS0niaLjU/ tXJf46AhYASuUU8LxX9Ga3x89J3pzKM+jW0ge1ubydYi8h7EO/9iKixPaHAaaRheZUrmwTbW/6DwW JPrJZ2csxeiHlTWbJln/+g==; In-Reply-To: (message from Andrea Corallo on Wed, 25 Oct 2023 18:02:52 -0400) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 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-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:311881 Archived-At: > From: Andrea Corallo > Cc: stephen.berman@gmx.net, incal@dataswamp.org, emacs-devel@gnu.org > Date: Wed, 25 Oct 2023 18:02:52 -0400 > > So I did some experimentation (scratch/comp-run branch) where I splitted > the code needed to run the (async) native compiler at runtime into a > separete file (comp-run.el). > > I think it's a good change as: > > 1- instead of loading almost 6000 lines of compiler only code > (comp.el+comp-cstr.el not including dependencies) a normal user now > has to load only ~500 LOC. The rest will be loaded only by the async > workers. > > 2- it is conceptually correct to divide the code needed at runtime from > the one necessary to actually compile. > > 3- at the first startup on my configuration only gv.el gets native > compiled! Sounds good to me, thanks. > Limitations so far are that: > > 1- if any of the async compilation will have to report a warning, > warnings.el will require icons.el that will still require cl-lib.el. I don't see this as a significant problem. Here's my data point: I use desktop.el to save/restore my production sessions, which tend to be large, so when a new version of Emacs starts, I have more than 200 packages natively-compiled in the background during the first 2 minutes, and not a single warning emitted. Granted, those are all bundled packages, but why shouldn't we expect third-party packages to live up to the same standards? And in addition, users can always turn off the warnings if loading cl-lib bothers them. > 2- if cl-lib.el and other dependencies of the native-compiler are not > native compiled because of some other package gets loaded, they might > stay bytecode. In this case the native compilers running in > background _might_ have some performance degradation. I guess is > more theoretical than practical but we might want to have a look > before committing. Doesn't happen here: I see that cl-lib is natively-compiled in the very first group of files compiled after Emacs starts.