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: Sun, 13 Oct 2024 18:24:11 +0300 Message-ID: <86iktwt49w.fsf@gnu.org> References: <86jzedy84g.fsf@gnu.org> <86r08luqsq.fsf@gnu.org> <86frp1unvu.fsf@gnu.org> <86y12stv24.fsf@gnu.org> <86set0th9d.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="9004"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 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 Sun Oct 13 17:25:06 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 1t00Sw-0002B1-7K for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 13 Oct 2024 17:25:06 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t00Sf-0002uu-Al; Sun, 13 Oct 2024 11:24:49 -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 1t00Sc-0002uW-W5 for bug-gnu-emacs@gnu.org; Sun, 13 Oct 2024 11:24:47 -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 1t00Sc-0008Cc-Kv for bug-gnu-emacs@gnu.org; Sun, 13 Oct 2024 11:24:46 -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:References:In-Reply-To:From:Date:To:Subject; bh=uLWx4KPGXmrPWhaBVlF5yBEEHW48ien6ta896iNkz1U=; b=KN9MOv89u2BtheaAqAfOwiqJ8y/yGdcuGcjC0YKL833xGJBCRdMcJffKKq1im5kDz/pG8K0Bmw69uLfkOu38BRMyrrN2cm/LiQRYhJNzFjnydCfTy0GwxXkYx7bXWvh+SHE9yaiG7J4eGjFHxdtdIDBxi0IDLaCnOSx2kp2c0vkzWZQP6Mm3tlfT6Jn2y+JcQONagbL8E+89iQ1o9lAO9JXgPfdXu1nvnUqU5vsF8j3qynXe9TrsUnHu/PQLobeIKl5AG9ZkC5P+68InxKFT0VqYK3P2q4YsxyRgePbHWOnXec3neKtyXDuKQLmImUhKrtXHUUxjtdXvR4HzxiLxLA==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t00Ss-0000bl-64 for bug-gnu-emacs@gnu.org; Sun, 13 Oct 2024 11:25: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: Sun, 13 Oct 2024 15:25: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.17288330782298 (code B ref 41646); Sun, 13 Oct 2024 15:25:02 +0000 Original-Received: (at 41646) by debbugs.gnu.org; 13 Oct 2024 15:24:38 +0000 Original-Received: from localhost ([127.0.0.1]:52097 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t00ST-0000b0-US for submit@debbugs.gnu.org; Sun, 13 Oct 2024 11:24:38 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:37360) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t00SS-0000al-EX for 41646@debbugs.gnu.org; Sun, 13 Oct 2024 11:24:36 -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 1t00S5-0008AN-I3; Sun, 13 Oct 2024 11:24:14 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From: Date; bh=uLWx4KPGXmrPWhaBVlF5yBEEHW48ien6ta896iNkz1U=; b=N0ynIlIRtVCvV/Q8Ejoe Brg550W/DwuEWQ5aFRLwzsp9x2CrkjwLwBlgNHSc7eShJ1pu82lNJYZeeFVZHglrW65pgIKV3hb6z 7K5blt/52CH0fn/vTxHIQrREdaQJ2r6GtXxvWrRz99JtFz+GbzUSP2Z+ReUga8+MJ4ET66P/882Y9 iw/ql+qbzYjoEGlWcKhFYJGzsC1VRdBIHYUR1cCaTPXbGTgEQ+zQDmZZnsaWPkMMFNrt0CEjAbQ5n u19TrWLav1tFjqKTz3E9+iUdCv+Bod67jjrKYBc2R7iUqw+LwkJQkUVx5UgRETRSy4MDrkhkBVRtr 6QeZwUA95kbWKw==; In-Reply-To: (message from Lin Sun on Sun, 13 Oct 2024 14:47:46 +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:293527 Archived-At: > From: Lin Sun > Date: Sun, 13 Oct 2024 14:47:46 +0000 > Cc: Stefan Kangas , acorallo@gnu.org, 41646@debbugs.gnu.org, > monnier@gnu.org > > On Sun, Oct 13, 2024 at 10:43 AM Eli Zaretskii wrote: > > > > > From: Stefan Kangas > > > Date: Sun, 13 Oct 2024 09:50:42 +0000 > > > Cc: Andrea Corallo , 41646@debbugs.gnu.org, > > > Stefan Monnier > > > > > > Why should this be MS-Windows specific, BTW? Is slow startup time with > > > many packages much less of an issue on other operating systems? Is disk > > > access somehow slower on MS-Windows? > > > > I don't think this is Windows-specific, it's just that on Windows the > > gains might be higher. Disk access is somewhat slower on Windows, > > yes. > > Thanks, and append the result on Ubuntu: from 2.132 to 1.573seconds > (383 packages). > > > On Sun, Oct 13, 2024 at 9:50 AM Stefan Kangas wrote: > > > > Here's a suggestion: > > > > Since this is about speeding up load time during startup, how about > > adding a new defvar that enables a cache for `require`, and then set > > that to t during startup and nil after? That would make the feature > > work as expected without any user customization. In general, this is > > preferable, as this reduces the overall complexity of Emacs, both for > > users and developers. > > The "loadhints-cache" is not only for startup, actually it also works > anytime when requiring a feature but the `exec-path' has hundreds of > entries. Is it possible to extend filecache.el to cover this use case as well? For example, by adding to filecache.el the ability to save the cache, and perhaps also the ability to collect the cached files by hooking into 'load'?