From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: bug#30854: 27.0.50; Speeding up package.el startup Date: Mon, 21 Dec 2020 13:31:20 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="32679"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Stefan Kangas , "emacs-devel@gnu.org" To: Arthur Miller Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 21 19:32:09 2020 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 1krPya-0008P7-WD for ged-emacs-devel@m.gmane-mx.org; Mon, 21 Dec 2020 19:32:09 +0100 Original-Received: from localhost ([::1]:54462 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krPya-0000Ry-1P for ged-emacs-devel@m.gmane-mx.org; Mon, 21 Dec 2020 13:32:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41640) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krPxu-0008Qc-SV for emacs-devel@gnu.org; Mon, 21 Dec 2020 13:31:26 -0500 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:26077) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krPxs-0002jC-MO for emacs-devel@gnu.org; Mon, 21 Dec 2020 13:31:26 -0500 Original-Received: from pmg3.iro.umontreal.ca (localhost [127.0.0.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id 54B77440898; Mon, 21 Dec 2020 13:31:23 -0500 (EST) Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg3.iro.umontreal.ca (Proxmox) with ESMTP id C3BC6440307; Mon, 21 Dec 2020 13:31:21 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1608575481; bh=Yz0mCzB+xgwRh76oWCoMxxx4Z6iEcwqCsk8IAydUrN4=; h=From:To:Cc:Subject:References:Date:In-Reply-To:From; b=n2GfoCD1brJsqkz7XOCwQpppQDij6CGioW7XkuJvw3N4TvsjhHxugl8JY7dBC/X8K aWnx3z9+rF6n5hYmzHZbFrhlaHk2iuFvczznygEY99FnN/mW6EZ8gHRGF0Atu7YF3x XyFa/U/jt4ZpFPwGz73w4kr+D2TJrgu7WRJu82SX1xYaoP+PWE02+HxVJ7lrf3uFuc V5LnDP4jFJBPHFVjV6iTwqhQSPf/L6EMRwO8g4Kk9jv5CZ+7Jw/cPwy3MploCUFWRF pKpNU9hHAVrDb/XxUcUYjjzAgAlEpcF0tGNYZ43wZFVscuNzI95Mc0bA3ddCViEhs3 pixruBtRtC5Bg== Original-Received: from alfajor (69-165-136-52.dsl.teksavvy.com [69.165.136.52]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id 8E4B2120201; Mon, 21 Dec 2020 13:31:21 -0500 (EST) In-Reply-To: (Arthur Miller's message of "Mon, 21 Dec 2020 18:32:21 +0100") Received-SPF: pass client-ip=132.204.25.50; envelope-from=monnier@iro.umontreal.ca; helo=mailscanner.iro.umontreal.ca X-Spam_score_int: -42 X-Spam_score: -4.3 X-Spam_bar: ---- X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:261413 Archived-At: >> (On a related note, I'm not sure that making `package-activate-all' >> disappear is TRT. I think it is useful to keep that function.) > When you say "to keep that function" you mean to run it at startup, even > when quickstart is activated or you mean to keep it at all as > functionality in package.el? `package-activate-all` is not an internal function (e.g. it's documented in `etc/NEWS.27`) so we have to preserve it. It can be very useful also for users who want to have more control about which packages are activated when (e.g. activating packages before the end of `early-init.el` or from within `init.el`). > This does not do any functional change other but avoiding to load > package.el when quickstart is active. If a user would really like to > have package.el loaded from the start time, than it is just to call > (package-initialize) in user init file? `package-initialize` is a thing of the past. Nowadays users should never need to call it (that doesn't mean it's never useful: it's used internally in various `package.el` functions and there may still be cases where it's needed outside of `package.el` but these should be considered as bugs, IMO). >> Does your patch avoid loading package.el? > Yes. When package-quickstart.el exists in user-emacs-directory. > If that file does not exists then everything is loaded just as before, > and (package-activate-all) will be run as normally. Oh, indeed, that's another option I had not considered. I was thinking of arranging for `package.el` not to be loaded regardless of the use of `package-quickstart` (i.e. preload all of `package-activate-all`), but maybe you're right and the only case where it's worthwhile avoiding to load `package.el` is when we use `package-quickstart`. Stefan