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: cl-lib warnings Date: Fri, 06 Jan 2023 09:34:29 +0200 Message-ID: <83358ow1yy.fsf@gnu.org> References: <86o7s3lsnx.fsf@mail.linkov.net> <86bknx8783.fsf@mail.linkov.net> <837cylapt4.fsf@gnu.org> <83wn6kamwr.fsf@gnu.org> <83len0aldq.fsf@gnu.org> <87v8lkmd9z.fsf@melete.silentflame.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="11010"; mail-complaints-to="usenet@ciao.gmane.io" Cc: lekktu@gmail.com, joaotavora@gmail.com, juri@linkov.net, monnier@iro.umontreal.ca, emacs-devel@gnu.org To: Sean Whitton Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Fri Jan 06 08:35:20 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 1pDhG4-0002fL-C2 for ged-emacs-devel@m.gmane-mx.org; Fri, 06 Jan 2023 08:35:20 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pDhFT-0001K2-BD; Fri, 06 Jan 2023 02:34:43 -0500 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 1pDhF3-0001Eb-LB for emacs-devel@gnu.org; Fri, 06 Jan 2023 02:34:27 -0500 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 1pDhF2-0003kj-6J; Fri, 06 Jan 2023 02:34:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=YjF1UihON1ieuuaV6KTWveRslTftmtlkB1fo6NHiLwQ=; b=R+siV2YNRN9+UzrjGNrW jmyykkKCLxRpny2WFUAMtUy5JrSIA6CI8zBgwWgkjhy2/HYO7j1Ao4AcZkXHmBUp/t6wqnlBMMXeq IEGRH85rjdOkqlKowyJu5e3hFHySxKGxRZPoHJAvmDEQ9O8D9m39Ja7bskACOLBCa1MxkIFMQIbZi lsMBOYls/GOuKIUioaBYqk9+nkP8lVXg9XmGDknXLd9AdWJXFTcdcAL9LJwF5MG1ope/y+lZHxAsJ FingeGOHZx+nH+Z9SSymkdgpvEdTp01XRXNXdCPRW73j2HvOUgS3ce6c0gDe0XIHC4vzyEvVPNhUs eCkcoLrFF0bzRA==; Original-Received: from [87.69.77.57] (helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pDhEz-0007BO-DD; Fri, 06 Jan 2023 02:34:14 -0500 In-Reply-To: <87v8lkmd9z.fsf@melete.silentflame.com> (message from Sean Whitton on Thu, 05 Jan 2023 22:40:24 -0700) 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:302249 Archived-At: > From: Sean Whitton > Cc: Juanma Barranquero , João Távora > , juri@linkov.net, monnier@iro.umontreal.ca, > emacs-devel@gnu.org > Date: Thu, 05 Jan 2023 22:40:24 -0700 > > >> Our policy and practice was since long ago that any package which is > >> always or almost always loaded at startup without any user say-so, > >> should be preloaded, since not doing that makes very little sense. > > > > We don't have precise metrics for "always or almost always loaded at startup", > > I think. > > > > But cl-lib is unconditionally required by 191 files under lisp/, right > > now. Including things like desktop, help-fns, help-mode, kmacro, > > imenu, tab-line and package, among many others. And of course vc, > > Calc and Org. And use-package, which will perhaps become the de facto > > way to customize their .emacs for many people. > > Eli's the only person who's expressed concern about preloading cl-lib, > but I don't believe he's responded to Juanma's statistics here. > > Eli, what do you think about this argument that cl-lib meets the > criteria you stated? It doesn't. If you think it does, I must have failed to explain the criteria. The "almost always" is not a numerical criterion, its "almost" part is intended to cover the cases where the package is _always_ loaded at startup, but only in some configurations of Emacs. Like something that happens only in GTK builds. So counting the number of Lisp packages that require cl-lib is not going to change my mind. In general, I'm worried by IMO too nonchalant attitude towards preloading more and more into Emacs. We should actively try to keep the memory footprint of the Emacs process in check. It is true that each package we add increases the footprint by a small amount, but those small amounts eventually add up to a sum that is significant. On my system starting "emacs -q" with various versions of Emacs produces the following memory footprint values: emacs 22.1 10.6 MiB emacs 23.1 11.5 MiB emacs 24.1 13.4 MiB emacs 25.1 32.5 MiB emacs 26.1 35.5 MiB emacs 27.1 25.1 MiB emacs 28.2 26.7 MiB Granted, not all of the increase is due to preloading more Lisp, but some of it is, and so IMO we should resist the temptation to add more just because it saves us some 'require's.