bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#41646: Startup in Windows is very slow when load-path contains many


From: Eli Zaretskii
Subject: bug#41646: Startup in Windows is very slow when load-path contains many entries.
Date: Mon, 01 Jun 2020 20:17:19 +0300

> From: Nicolas Bértolo <nicolasbertolo@gmail.com>
> Date: Mon, 1 Jun 2020 13:46:01 -0300
> Cc: 41646@debbugs.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.

You may be surprised how many users of GNU/Linux consider 5 sec during
startup an unacceptable slowdown.

> > 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.

'chmod' doesn't access the file, it only accesses the directory.  So
it could be much faster.

> > 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.

Is this supposed to work only when packages are installed by
package.el?  What about manual installation?





reply via email to

[Prev in Thread] Current Thread [Next in Thread]