From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Arthur Miller Newsgroups: gmane.emacs.devel Subject: Re: bug#30854: 27.0.50; Speeding up package.el startup Date: Mon, 21 Dec 2020 19:16:07 +0100 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="6420"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) Cc: Stefan Monnier , "emacs-devel@gnu.org" To: Stefan Kangas Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Mon Dec 21 19:17:28 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 1krPkO-0001bB-QZ for ged-emacs-devel@m.gmane-mx.org; Mon, 21 Dec 2020 19:17:28 +0100 Original-Received: from localhost ([::1]:37530 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1krPkN-0001Hj-TV for ged-emacs-devel@m.gmane-mx.org; Mon, 21 Dec 2020 13:17:27 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38472) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krPjD-0000FC-9E for emacs-devel@gnu.org; Mon, 21 Dec 2020 13:16:15 -0500 Original-Received: from mail-oln040092071109.outbound.protection.outlook.com ([40.92.71.109]:22875 helo=EUR03-DB5-obe.outbound.protection.outlook.com) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1krPj9-0005kS-Qc for emacs-devel@gnu.org; Mon, 21 Dec 2020 13:16:14 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mDLyBbaDk5E1UUpQGi28MRwVTnOchp5quwmN9YkxwGyApgYpl4MCn22sXLV4oAp4uBSBt7h3ilaeO/fylTrLwLNE66xLoHFJ/J3JrWp6Xk7Z/yqb7mAc5gfCGvIjoiQUowrqfL6I8WTbUQd1CvrJjNtyiL3mRgSGNQWvMZ3J8z2l3vYm98lVZJb/kQ+1K6qhDju/7GAFMNyUxdepyByLc61gzvBv+4pOkkW8Xl1t/SpXwefv7hWy2x7R+OgkusdKVBK57Pi/g9tk0dEzBxMrn0eyFD2jl0L09GKTP65HNGUAaDTy2Fii+wTDXJ/hJD7JZcmTA7Lv+g9OlZAe1nhRHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W8Mae5pL+Xj5Ws4nrgPmtmbP7X93WcvUHpG/+JVdl3Y=; b=n966WvAvNWRl5pI5Eeg1tsvfxLZvLzdVR2rCrprXtacKr1Wa+mzWbRz6F7/xysQGN5p24+6+Ik1edJik++anx3qQdd2n/AqJykeGHJzggAl/JTnlxUYVWk5pQjgaR6p7wW6QC2+78O5Ai9NO7bBScxV1msOhAFqbWgw7uUA5lgdAV6tTgnjWqBTUX6eOlwBQKbDtkyLm0Eqlo6vnxAWEud2nJtvSihfh2+Rn81e1rEtyc0XLhulU9q6NgkHDYc4bzdmLOlEWPXUKjv+JlB91W61wg62O6BLPj6S0AvbZ7+1KcCl5LVGlWaIis+C6ClWKIIpJH8T89QomUn2DRRJ0eQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=live.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=W8Mae5pL+Xj5Ws4nrgPmtmbP7X93WcvUHpG/+JVdl3Y=; b=AA1Q3RM3FGPlzYY7Plegfr8zPzSN35cl9ds0aE7hd9LHxMwNu4JgYzSA5FhXbzfyifeAdVfQWXeYRc4WdsipKJUiMxj58UCzyzsLcfukHUI7PNbZmavqX7ZLVqcTBwdoz24y/BYuZ9IvqSe0TkDODRVjejW4Eqnr4zQjrFxG5BblJgCicHqoPtTXRpB01oOa2PWJAH9HqovPyFdmokJfSLjSzjwJnYahKdeUiQfH09CH3BPCGnoTEj0fdYZgGicUUtaHSycWOuuqustlMDCjQeUCJE2LtC7/D+jynNt7lUxoGGzeTAmhJGkejI9q6NGu48aYhG//AfA7uveVEVnlgA== Original-Received: from VE1EUR03FT050.eop-EUR03.prod.protection.outlook.com (2a01:111:e400:7e09::48) by VE1EUR03HT144.eop-EUR03.prod.protection.outlook.com (2a01:111:e400:7e09::401) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3676.22; Mon, 21 Dec 2020 18:16:08 +0000 Original-Received: from AM0PR06MB6577.eurprd06.prod.outlook.com (2a01:111:e400:7e09::51) by VE1EUR03FT050.mail.protection.outlook.com (2a01:111:e400:7e09::465) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3676.22 via Frontend Transport; Mon, 21 Dec 2020 18:16:08 +0000 X-IncomingTopHeaderMarker: OriginalChecksum:DE27ED26CEECC875BF46C93C21D91B36DD570AAA132CDD13980CF6924BB2097B; UpperCasedChecksum:43A778CCDB9156E2AB7ACFA15400287F9B6FE34652D58CD75FA5F37A162F9948; SizeAsReceived:8590; Count:46 Original-Received: from AM0PR06MB6577.eurprd06.prod.outlook.com ([fe80::9487:8c7d:da00:4993]) by AM0PR06MB6577.eurprd06.prod.outlook.com ([fe80::9487:8c7d:da00:4993%8]) with mapi id 15.20.3676.033; Mon, 21 Dec 2020 18:16:08 +0000 In-Reply-To: (Arthur Miller's message of "Mon, 21 Dec 2020 18:32:21 +0100") X-TMN: [Fen2Wo35oidysUvSqS1i13JoMke2kGJe] X-ClientProxiedBy: AM7PR02CA0019.eurprd02.prod.outlook.com (2603:10a6:20b:100::29) To AM0PR06MB6577.eurprd06.prod.outlook.com (2603:10a6:208:19a::23) X-Microsoft-Original-Message-ID: <878s9rm3dk.fsf@live.com> X-MS-Exchange-MessageSentRepresentingType: 1 Original-Received: from pascal.homepc (90.230.29.56) by AM7PR02CA0019.eurprd02.prod.outlook.com (2603:10a6:20b:100::29) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3676.29 via Frontend Transport; Mon, 21 Dec 2020 18:16:07 +0000 X-MS-PublicTrafficType: Email X-IncomingHeaderCount: 46 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-Correlation-Id: 4e0b0921-943a-4f3d-9e7c-08d8a5dc7d1c X-MS-TrafficTypeDiagnostic: VE1EUR03HT144: X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: s8w8fw+SafVskKs7PQ0x6NHM0xJzYclPdPzxNhoDB7ybue4Js0/MVXKFwKjZPZeeUBbbWOYN+uk8rF/u6yFV+BvABTIaAeMiqHEyxWFK0j5Wpsi4mU/E/zsHfiW0z6CyKc9E89ssoeSKZFsHQex+dRHj5dTjfxofAWAJUbDcfgfXAsV8JgJfTQH0MwPcQTWzHY2zfVABciRTqjeKSHwIjKZiJS4taivzwXEfEGlFh2uXpe9YXpGShtmA+mLlIuhm X-MS-Exchange-AntiSpam-MessageData: L/tpw7sTKg3P8yyh4LbFkYAmQ81GWRVYe/bDl1qQood7UOylNaIjbWO1ssQ3yeOuJ9SHtklyIPN0ylx5Fs/f/fDAHBxh6ypvI8YPxADN0m6VPfNqY+7ewWmrsxJlAMmJaDUK96AzfJAyjpJwwMzxmg== X-OriginatorOrg: live.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Dec 2020 18:16:08.2813 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-Network-Message-Id: 4e0b0921-943a-4f3d-9e7c-08d8a5dc7d1c X-MS-Exchange-CrossTenant-AuthSource: VE1EUR03FT050.eop-EUR03.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: Internet X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VE1EUR03HT144 Received-SPF: pass client-ip=40.92.71.109; envelope-from=arthur.miller@live.com; helo=EUR03-DB5-obe.outbound.protection.outlook.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, MSGID_FROM_MTA_HEADER=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-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:261409 Archived-At: Arthur Miller writes: > Stefan Kangas writes: > >> Arthur Miller writes: >> >>>> Yes: `package-activate-all` (called from `startup.el`). >>> >>> See if this is acceptable. I tried to make as few chagnes to package.el >>> as possible, and I didn't wont to introduce a new file, so I just put >>> the relevant files into startup.el. >> >> FWIW, I think a new file would be better. We could then also move the >> bits and pieces from subr.el to this more logical place. > Aha. I didn't know there are pieces in subr.el also in play here. I am > not so well introduced into internals. > >> (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? > > For the latter, I haven't removed anything. When quickstart is active, > and the package-quickstart.el exists, then we don't need to run it. We > just need to make Emacs aware of autoloads and load-paths where to find > those files refered by autoloads. That is qhat package-quickstart.el > does, so we can just loaded. At least what I think. Seems to work. > > User will have to run package-initialize at later time for any > package.el functions (refreshing contenst, installing, unisntalling > etc). For me it is quite acceptable cost for the performance gain. > >>> I am not sure about package--activated; if quicstart should set it to 't >>> or not. I don't think is needed, and am not sure if it is straight wrong >>> to do too in quickstart, so I don't do that. >> >> It is still useful if we keep `package-activate-all', I think. >> >> But my preference would in any case be to make any functional changes >> separately from this refactoring. > 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? > >> 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. I forgott also to say, I can also udate "user" functions of package.el (package-list, package-refresh-contents etc) to check if package.el is initialized, and if not they could call package-initialize on behalf of user, so end users does not need to call pacakge-initialize themselves, neither in init file or interactively. As I see now, some of them already do so, some don't.