From: "Nicolas Bértolo" <nicolasbertolo@gmail.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 41646@debbugs.gnu.org
Subject: bug#41646: Startup in Windows is very slow when load-path contains many entries.
Date: Mon, 1 Jun 2020 13:46:01 -0300 [thread overview]
Message-ID: <CAFnS-Ok_86j+CY1jJtH7CU3eC7=GpVqwvgrb5_iV01FWnVUc0A@mail.gmail.com> (raw)
In-Reply-To: <83y2p6epp5.fsf@gnu.org>
> So this is not specific to Windows, it's just that Windows has slower
> file access. IOW, if load-path becomes significantly larger, the slow
> startup will show on Posix systems as well, right?
Exactly, but not nearly as bad. I profiled the same Spacemacs configuration in
Ubuntu 20.04 and startup takes 10 seconds, with 5 seconds spent inside openp().
Compare this to 40 seconds in total and 32 seconds inside openp() in Windows.
> Next question: are the 'wopen' calls coming from 'openp'? if so,
> perhaps we could first try a cheaper call, like 'chmod' (or its Win32
> API equivalent), and save the 'wopen' call if 'chmod' fails? Did you
> try that?
They come from openp(), yes. I haven't tried it. I think the issue is related to
the IO architecture in Windows, so I don't expect major speedups, but it could
certainly help.
> My main concern with a cache is how to make sure it reflects what's on
> the disk, when files are added or removed.
That is my main concern as well. A good option would be to rely on package.el to
generate the load-cache.el file for a package when it generates autoloads. If we
can't find any of the files mentioned in the cache then we fallback to the
current load-path code. That is a simple solution that would take care of
addition and removal of files, I think.
Nico.
next prev parent reply other threads:[~2020-06-01 16:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-06-01 14:26 bug#41646: Startup in Windows is very slow when load-path contains many entries Nicolas Bértolo
2020-06-01 16:05 ` Eli Zaretskii
2020-06-01 16:46 ` Nicolas Bértolo [this message]
2020-06-01 17:17 ` Eli Zaretskii
2020-06-01 19:51 ` Nicolas Bértolo
2020-06-02 2:17 ` Eli Zaretskii
2020-06-03 1:07 ` Nicolas Bértolo
2020-08-14 17:22 ` Lars Ingebrigtsen
2020-08-14 19:07 ` Eli Zaretskii
2021-05-13 9:17 ` Lars Ingebrigtsen
2021-05-13 10:20 ` Eli Zaretskii
2021-05-13 11:31 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAFnS-Ok_86j+CY1jJtH7CU3eC7=GpVqwvgrb5_iV01FWnVUc0A@mail.gmail.com' \
--to=nicolasbertolo@gmail.com \
--cc=41646@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).