[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: |
Fri, 14 Aug 2020 22:07:15 +0300 |
> From: Lars Ingebrigtsen <larsi@gnus.org>
> Cc: Eli Zaretskii <eliz@gnu.org>, 41646@debbugs.gnu.org
> Date: Fri, 14 Aug 2020 19:22:26 +0200
>
> > That was a very good idea. The attached patch reduces time spent
> > in openp() during startup by 5 seconds, or 15%.
>
> That's a huge speed-up indeed.
>
> [...]
>
> > - fd = emacs_open (pfn, O_RDONLY, 0);
> > + /* In some systems (like Windows) finding out if a
> > + file exists is cheaper to do than actually opening
> > + it. Only open the file when we are sure that it
> > + exists. */
> > +#ifdef WINDOWSNT
> > + if (faccessat (AT_FDCWD, pfn, R_OK, AT_EACCESS))
> > + fd = -1;
> > + else
> > +#endif
> > + fd = emacs_open (pfn, O_RDONLY, 0);
> > +
>
> This is a Windows-specific patch, so I have no opinion on it. Eli?
> Does this make sense to you?
Not sure. 15% sounds too little for having OS-specific code in that
place. I hoped it will be much more.