From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lynn Winebarger Newsgroups: gmane.emacs.devel Subject: Re: Unboxed package manager Date: Tue, 21 Mar 2023 20:48:29 -0400 Message-ID: References: <57668895-8EEA-44F7-BD46-9CDFAA11FD2C@gmail.com> <08b5f766ddd9da754a86@heytings.org> <08b5f766ddf4b33993cd@heytings.org> <08b5f766dd896dfbed4c@heytings.org> <83jzza6xwk.fsf@gnu.org> <08b5f766dd0f765bb1a9@heytings.org> <83edpi6vl4.fsf@gnu.org> <08b5f766dd05e9469540@heytings.org> <838rfq6mi8.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="16760"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Gregory Heytings , casouri@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Mar 22 01:49:31 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 1pemfT-00049X-6a for ged-emacs-devel@m.gmane-mx.org; Wed, 22 Mar 2023 01:49:31 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pemep-0000qA-0W; Tue, 21 Mar 2023 20:48:51 -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 1pemej-0000pe-4C for emacs-devel@gnu.org; Tue, 21 Mar 2023 20:48:45 -0400 Original-Received: from mail-pj1-x102b.google.com ([2607:f8b0:4864:20::102b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pemeh-0001e2-Fn; Tue, 21 Mar 2023 20:48:44 -0400 Original-Received: by mail-pj1-x102b.google.com with SMTP id f6-20020a17090ac28600b0023b9bf9eb63so17617222pjt.5; Tue, 21 Mar 2023 17:48:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; t=1679446120; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=xiGOT5VNTV7+WiivmLrepVH1bLN219o/nngUGQs3UN0=; b=f6bG9HDvBMkvpzMnA2h37FyeuRRORkNu5Mw+n9k+/H0cI/jZHgAoyzazfJ3DzGIUlj pwRSkFUcQ21tWy/9pMVC82LaBvYwkayJVx7fCNPNXw/C4m9X30zltT/M7si5k4BHb7je q2o2JtmP17HGzGi/Q0g/OucWOzuw6F6dWz8z47pIO94Ja3/w67tgHyMwpTC53XmpL+aK 4WVXA4qqluXLl4L6p8E9EHF+m8cS5sC0u9iVnVJrSHG+u21q05C7J6IlQwH7gYuNWCBg MHR5m6lE2zCabKvN70St8R7OJVmGP2ymqnmLqnwa3SJNN1XGDcvWND3xMbiEo/WpsxQJ ypmA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679446120; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=xiGOT5VNTV7+WiivmLrepVH1bLN219o/nngUGQs3UN0=; b=fqSH0WLd+TnaVAB7OKNI68UL0Db4ti/4Y9s8QlVayCKposmyLDTgYRvW4COunxceOs 2suC7nOIzM/w6ipE3KqVzpmvcU6UJqOCddnY9uN30hqGPCzA8iDYKPwbuT7ImdkOdsc0 oVTzZP55CbYhx1tUx3IQs4XJV5R+dbCxUtoZLH+obEEg7lUKvHwTiuyz0tHXtl59O62s lLI764Pb/4o/cNZ1mi4BHlMkW87bBP1SZLA8miGtjZNgcFLkquKpx4W1N7DVhth2hJMs HykX97lhygQLWZTg32XjPDknDgABEjnjnkK9INMZwrzJmkvsLopskc+JbCf5UdCwJdmF nzjA== X-Gm-Message-State: AAQBX9c3YHb/cRhHdM3pJw2slR3Hzv/NRAIRxYjZv7KDct3m9TRN+LaL /GKDfQ47dB/zT5iJb8d2VzUGfxLXh/nskroLwJrzCMyL X-Google-Smtp-Source: AKy350Y92YWLz8D3PkLM46GRY86BSBRiSFrhCR7yLVdXP1Rx53Ike8WDG55g3U7x+6nj6iYLjDCrZH00bFcqhta+l8U= X-Received: by 2002:a17:902:e888:b0:19a:5953:e85c with SMTP id w8-20020a170902e88800b0019a5953e85cmr219194plg.1.1679446120501; Tue, 21 Mar 2023 17:48:40 -0700 (PDT) In-Reply-To: <838rfq6mi8.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::102b; envelope-from=owinebar@gmail.com; helo=mail-pj1-x102b.google.com X-Spam_score_int: -10 X-Spam_score: -1.1 X-Spam_bar: - X-Spam_report: (-1.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, FREEMAIL_REPLY=1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action 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:304688 Archived-At: On Tue, Mar 21, 2023 at 1:29=E2=80=AFPM Eli Zaretskii wrote: > > Date: Tue, 21 Mar 2023 14:20:41 +0000 > > From: Gregory Heytings > > cc: owinebar@gmail.com, casouri@gmail.com, emacs-devel@gnu.org > > > > >> I'm not surprised, but I wonder whether it's possible to do better. > > > > > > Yes: load each package with an explicit absolute file name, without > > > relying on load-path search. That is not guaranteed to work unless you are certain the required files are loaded in the correct order and don't use any "load" expressions themselves. > > Of course =F0=9F=98=89 But by "doing better" I meant "to improve the w= ay Emacs uses > > load-path in such cases". > > Why try to solve a problem if it can be avoided altogether? > > > Likely with some kind of cache. > > A cache will not necessarily help, and you will pay the price of > searching it at least once. It should be clear that enlarging the > length of load-path is not scalable, unless we make it a hash-table of > sorts. And I'm not sure we want this kind of complexity for such a > hilariously marginal use case. Maybe 2000+ is marginal (today), but let's say someone just installs the 300 packages available on gnu elpa. Note I'm just installing these packages, not actually loading any of them directly. Assuming the time cost is linear in the number of prepended paths, that would cause load time for system libraries, whether at startup or by autoloading, to increase to ~18s, or increase by a factor of 4, even if those packages are only available for autoloading and not actually loaded. Although if you look at something like doomemacs, people go to a lot of trouble to make packages available on their system without paying this overhead. The simplest approach is probably just to avoid increasing the size of the load path when it's not really necessary. Lynn