From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Stefan Monnier via "Bug reports for GNU Emacs, the Swiss army knife of text editors" Newsgroups: gmane.emacs.bugs Subject: bug#41646: Startup in Windows is very slow when load-path contains many Date: Fri, 01 Nov 2024 15:42:27 -0400 Message-ID: References: <86r08luqsq.fsf@gnu.org> <86frp1unvu.fsf@gnu.org> <86y12stv24.fsf@gnu.org> <86set0th9d.fsf@gnu.org> <86iktwt49w.fsf@gnu.org> <86cyk4t2su.fsf@gnu.org> <86a5f8t0sf.fsf@gnu.org> Reply-To: Stefan Monnier Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="10679"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: Eli Zaretskii , acorallo@gnu.org, 41646@debbugs.gnu.org, stefankangas@gmail.com, monnier@gnu.org To: Lin Sun Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 01 20:43:24 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1t6xYJ-0002cK-Jp for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Nov 2024 20:43:23 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6xY3-0004NA-BD; Fri, 01 Nov 2024 15:43:07 -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 1t6xXy-0004Mz-Op for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2024 15:43:03 -0400 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t6xXy-0005HK-GO for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2024 15:43:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=MIME-Version:Date:References:In-Reply-To:From:To:Subject; bh=R25nt/ddBCVp3R58COFBV0SV38HRBPHRDZu+DKgL+4w=; b=VlFqc08iUtPiQkWrvu6rD6wgCVxsA2Ztkm0SQ7OOSWt0shzrYDaOKHCzRUg58cdEKdwg7uAACiofKlxADS+7m2IMg3hir9y11Hz8fs5I7ISZ+kwvu+6rtkYzsUIsLYARPh2KVnNCv3l1gP200D8+g7UX04R433aGZydWmt1Qlqj0xwZvhaCiiTg3Md+D9unOhse0fjIAGvAayrKmDsEYWkGE49lMzANmYcgelOuVMFSj/XBh6UoYO5e0OQKfRjSjAGeWcCWRIZGT4VNqhXt+4NSzHmbQCTy5ctLIpcsyJlQ78V2mhYsbry39PlFpTi3u39SNKkWs6Dg5jxmML1f/iw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t6xXy-0004Hp-AY for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2024 15:43:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Nov 2024 19:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 41646 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch fixed Original-Received: via spool by 41646-submit@debbugs.gnu.org id=B41646.173049015816462 (code B ref 41646); Fri, 01 Nov 2024 19:43:02 +0000 Original-Received: (at 41646) by debbugs.gnu.org; 1 Nov 2024 19:42:38 +0000 Original-Received: from localhost ([127.0.0.1]:51560 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6xXa-0004HS-Bs for submit@debbugs.gnu.org; Fri, 01 Nov 2024 15:42:38 -0400 Original-Received: from mailscanner.iro.umontreal.ca ([132.204.25.50]:49237) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6xXX-0004HK-Lq for 41646@debbugs.gnu.org; Fri, 01 Nov 2024 15:42:36 -0400 Original-Received: from pmg2.iro.umontreal.ca (localhost.localdomain [127.0.0.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id C32DC803AD; Fri, 1 Nov 2024 15:42:29 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=iro.umontreal.ca; s=mail; t=1730490148; bh=+rIgRwen9mzTvsJ0nqGpRnVPMM12JlwmD2qGbywsnGU=; h=From:To:Cc:Subject:In-Reply-To:References:Date:From; b=dFgMtUHBCCASposx6JjvCzJyLnEP+rutD8enIBa0SFz8S8QMm/fLfUxwU1W9POrFR GDLGzmG3/qsy85/jW+cX2qQJ2m1SZISmsNPNtHjNfIuYHfvyHKqW6opo6Upekmem5k LBVc+6Eb9JS7/cdN0lURacmoMNMgyCo+EJgSCY2eqwHKFulNci/ZbKk5xdEvjmNz8g 13yGP/nL2BSMPEJjZNO/AbSDwcZVYoY3QOX06wjwKFY0n/lRzDNJB2lHpTKlpNTXCv JthtnNPdv64B5AZxvklpi994VBueQf5HSK+7jLN5WoNZ3DQliuM7Ze1FWTKYSWxOcl gtfQum3/u90OQ== Original-Received: from mail01.iro.umontreal.ca (unknown [172.31.2.1]) by pmg2.iro.umontreal.ca (Proxmox) with ESMTP id E3A9480169; Fri, 1 Nov 2024 15:42:28 -0400 (EDT) Original-Received: from pastel (104-195-225-43.cpe.teksavvy.com [104.195.225.43]) by mail01.iro.umontreal.ca (Postfix) with ESMTPSA id A319B1200BA; Fri, 1 Nov 2024 15:42:28 -0400 (EDT) In-Reply-To: (Lin Sun's message of "Mon, 21 Oct 2024 17:11:17 +0000") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:294703 Archived-At: > I had searched all 200+ packages in my test env, most of the packages > use their feature name as the prefix, only 11 packages have > exceptions. FWIW, I just looked at the longest common prefix for .el files in (Non)GNU ELPA packages and the ratio is a bit worse, but still good enough that it should give good speedups: (let ((default-directory "../nongnu/packages/")) (mapcar (lambda (dir) (when (file-directory-p dir) (let ((completion-regexp-list '("\\`[^.].*\\.el"))) (list (intern dir) (file-name-completion "" dir))))) (directory-files ".")))) In both GNU ELPA and NonGNU ELPA only about 10% of the packages had a non-empty common prefix, which means that `load` would be able to skip about 90% of the package directories. Stefan