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.bugs Subject: bug#41646: Startup in Windows is very slow when load-path contains many Date: Fri, 01 Nov 2024 21:58:48 +0200 Message-ID: <86wmhmzpxj.fsf@gnu.org> 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> <86zfmizxu2.fsf@gnu.org> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="38549"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acorallo@gnu.org, 41646@debbugs.gnu.org, monnier@iro.umontreal.ca, stefankangas@gmail.com To: Lin Sun Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 01 21:00:28 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 1t6xoq-0009pY-3w for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Nov 2024 21:00:28 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6xoU-0006G3-4V; Fri, 01 Nov 2024 16:00:06 -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 1t6xoS-0006EJ-7Z for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2024 16:00:04 -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 1t6xoR-0006pJ-0S for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2024 16:00:03 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=References:In-Reply-To:From:Date:To:Subject; bh=Fd5YMY63tVj9Cs821jqOr+nHSoefaKN1jFLjl/CF8VU=; b=Owu4geY/fXiKSUNbd192fWHCObZ5bbYE1+eqLqsggfTcnmYEBUiCjoe9qAV+dJtWm8rtfLmJWe7e93z43tFkjCUhY9x5IKphoLqCRksKs7RZVqcsNToiC1UwXeUJyiBlsWKilF7ObDk5dtcHVGCPYQ7zSQESuLZNztFwoOJTveqrtF0olw7dOjxKItHYS4Z+jkMk7x3TccAhCfKT4XenFOet99mEeDUKPBc9HQRmiV4YFhzEhyx+BsiTU4oENbOLALvqHSK0e0zEvAcw3fOxF3lQz/kc8rGRmu1FDNeyQfWgHg1SFLsPeZ4R0Q4aNrzR/6zHC3hE1iwfqu3YpCoKcQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t6xoQ-0004mA-RS for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2024 16:00:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Nov 2024 20:00: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.173049114218308 (code B ref 41646); Fri, 01 Nov 2024 20:00:02 +0000 Original-Received: (at 41646) by debbugs.gnu.org; 1 Nov 2024 19:59:02 +0000 Original-Received: from localhost ([127.0.0.1]:51662 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6xnR-0004l1-S1 for submit@debbugs.gnu.org; Fri, 01 Nov 2024 15:59:02 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:39866) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6xnP-0004kp-G1 for 41646@debbugs.gnu.org; Fri, 01 Nov 2024 15:59:00 -0400 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 1t6xnJ-0006fl-Fp; Fri, 01 Nov 2024 15:58:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=References:Subject:In-Reply-To:To:From:Date: mime-version; bh=Fd5YMY63tVj9Cs821jqOr+nHSoefaKN1jFLjl/CF8VU=; b=i3ubENFr2DpR RipqjZYpNgOYxfqBKjD/WVO+G6p92zmn9fRIZwGUyYV5IE5PLzSS5o2/WI9ViNhIo7Z3BXyXzb1U+ Cjrokpz8+whIUJmeVi1SaviAqTQOGlxgeRRXU3Fuvp7rAlmmUDHaw1yWRJzmDRCI9Lf7l4jdXIbPT IJ6s38CfOeSe4+m/D4hcRuIJ/d/XujCqPwmSQCdVr2BFYSi4qNa903WmMVdE03yqfVuPv7cvnk0IM 7pT+FFgm41IO+X95ql683ZiR6J2WZ/AUrp0HhRTG14FQk/K+oBV10gIDvKv+C4xGMttau1FG1yw0x oN4mypJ8+nqW+1MmyUlIwA==; In-Reply-To: (message from Lin Sun on Fri, 1 Nov 2024 18:15:23 +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:294705 Archived-At: > From: Lin Sun > Date: Fri, 1 Nov 2024 18:15:23 +0000 > Cc: monnier@iro.umontreal.ca, stefankangas@gmail.com, acorallo@gnu.org, > 41646@debbugs.gnu.org, monnier@gnu.org > > How about this: I write some windows specific code only available on > the windows to cache the files for the load-path. It will NOT affect > other platforms. Like a flag "load-path-cache-expired 60" (nil/t) for > windows users who won't change path/files a lot, then Emacs can cache > the files list for path entries for 60 seconds. As I pasted, with the > files cache, it can reduce the startup time from ~16s to ~5s, and also > improve the running time performance. That will save a lot of emacs > windows users. I'd like us first to have a good understanding of the problems, their aspects, and the goals of the proposed changes. I'd also would like to have some agreed-upon timing of searching load-path, including its dependence on the number of directories in load-path, and the relative part of the startup that this particular aspect explains. (Are you really saying that it takes Emacs 16 sec to search 300 directories for 300 files?) Only then we will have enough information to discuss potential solutions and their effects on the startup time. In general, a Windows-only feature is something I'd prefer not to have, because quite a few users use Emacs on both Windows and GNU/Linux, so having OS specific features should be avoided. But it can be acceptable if no better alternative exists. But this is something we should talk about much later, not now.