From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Lin Sun Newsgroups: gmane.emacs.bugs Subject: bug#41646: Startup in Windows is very slow when load-path contains many Date: Fri, 1 Nov 2024 18:15:23 +0000 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> <86zfmizxu2.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="34220"; mail-complaints-to="usenet@ciao.gmane.io" Cc: monnier@gnu.org, acorallo@gnu.org, 41646@debbugs.gnu.org, monnier@iro.umontreal.ca, stefankangas@gmail.com To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Nov 01 19:17:25 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 1t6wD6-0008hN-4J for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 01 Nov 2024 19:17:24 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6wCv-0005bN-PR; Fri, 01 Nov 2024 14:17:14 -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 1t6wCm-0005X9-Kd for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2024 14:17:06 -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 1t6wCl-00051Y-8u for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2024 14:17:04 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=Date:From:In-Reply-To:References:MIME-Version:To:Subject; bh=f8qyCcDqGD7hkdIr8TRcZlI+D08vhgNI/QR1D86XlQ0=; b=YwITwagg2HXtJtOZbPoYGWsjyKZ2SyXEYMxiO6ArRsWsaMx+wWBNAcxHtDixtKSXlTrI1tqj6Nfa2Bj4vGLMoQ8L+dRarVhsgOq9UP0oTDyfEMmN1P1LbkjUxNCU59R5mvk4OePxzqKXzgMLEoDo5c4outLRkf0L0tHywLlwnLvoiA2x7sQfr1p/sd1z9Su1w2oXLSlX/pkLmwq/8cZblsP9hGRqCKjezcnNE9+4UnzHRatIUwAabcDv1jxuWHlmypP/sxTrBeP8LTZGfaVToxTWxyJuNY28WOkVlDHU0rhuDJJMEnNVsw6FSYaJj1NwTaqdr7YCPqB2gYg1Z2ycpQ==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1t6wCj-0001aB-WB for bug-gnu-emacs@gnu.org; Fri, 01 Nov 2024 14:17:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lin Sun Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 01 Nov 2024 18:17:01 +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.17304850026067 (code B ref 41646); Fri, 01 Nov 2024 18:17:01 +0000 Original-Received: (at 41646) by debbugs.gnu.org; 1 Nov 2024 18:16:42 +0000 Original-Received: from localhost ([127.0.0.1]:51089 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6wCQ-0001Zn-Dw for submit@debbugs.gnu.org; Fri, 01 Nov 2024 14:16:42 -0400 Original-Received: from mail-ed1-f48.google.com ([209.85.208.48]:44087) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1t6wCO-0001Zf-Bx for 41646@debbugs.gnu.org; Fri, 01 Nov 2024 14:16:41 -0400 Original-Received: by mail-ed1-f48.google.com with SMTP id 4fb4d7f45d1cf-5cb6ca2a776so3140497a12.0 for <41646@debbugs.gnu.org>; Fri, 01 Nov 2024 11:16:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730484934; x=1731089734; darn=debbugs.gnu.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=f8qyCcDqGD7hkdIr8TRcZlI+D08vhgNI/QR1D86XlQ0=; b=Ww0LKSyPXFPf0NmaKoq3lEglZVMdZMv1X9I4/ArRAPAxmKnZwo1/+wqAz+KeVCs5+X PFrEpQ/x+y8W4Ygq4lBo7++/mI/6MK38bAAdq/tTCtSob234q+jd/f55QrcYJOSy9oQJ vnAHd5xJvEuftLf5hTV7TFn04B53Lj8UlUM3KKriv1ri+qt6cK1aVDuD/meK82zEkNZR wMcovJ92tYQrw8s82JTjSEF67DFjliR8khN+0Ns5VOFNNbu/TrQzRw8FuN0iWXol2CjN n3F5796AwfbUnS7NDFlaN20ikxOub42vh+ZiCGV1vwotIfi/Os9do5i6L0EO/ofyc18c 8TTA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730484934; x=1731089734; h=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=f8qyCcDqGD7hkdIr8TRcZlI+D08vhgNI/QR1D86XlQ0=; b=uYlhCQwnPcz0BHowhqZfXaeZnXPtPjkVwJIwtD7bjgqiSoTgxdDYJGrmfFC6clh9VW 6eJlR+kzsr8C4AwaVM0Onx60q4H+azCPdh2+12atbX/9AWMrhYLUjgPZFkZeiL54xMkl gmIRmxWwCqOU4SvGxV/MlxTr7LoE83H1hpGpVA6c8V8ZbehjE5AebKG4M1g4ANmt1Aa0 4AL9V3WsHslGRpk301xszs51DzTuPUGMK+cB6K6wDYzxaUX1FWrOGfG/sQpbgcwLda/t tcVjyfHicO6me0VuHgGuFJko0uReAJi6mWUGDciSqvMr3YJ/OMG7n5eKQux5Ru4cM5pk qRng== X-Forwarded-Encrypted: i=1; AJvYcCUmJvwRT8ajCfHNs3QRSYJEfgVzo8M2/XHWgriM11Ty7jWHTpvYLP/BmTZ5IhRsfIyLvQj7sg==@debbugs.gnu.org X-Gm-Message-State: AOJu0YzZKG4YiS4QnA99kjGJ3pFV8JMxfL/5ZFDux5qV7ylS81IPo3yw m+nzv6wwjWwcAXc6ouwmYVIWiltvkt6Bp7DUM6kqSA1TorbFxAEhxkV8qpH2DBPnUIO5GQpJNJD pEFWA9Md/bEGdHtvNKYmk7nUffzOW4b3N X-Google-Smtp-Source: AGHT+IElhn97Ht3kHRDD8BpQfay7CgwyFkb8P4vnGquQkU5juJuHfC6s8VKTQYHzqlaogvcYQzVrVTa40q593OmjWgw= X-Received: by 2002:a05:6402:42c6:b0:5c9:1cf3:8fca with SMTP id 4fb4d7f45d1cf-5cd54af11afmr9304913a12.24.1730484934231; Fri, 01 Nov 2024 11:15:34 -0700 (PDT) In-Reply-To: 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:294699 Archived-At: 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.