unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: nicolasbertolo@gmail.com, 41646@debbugs.gnu.org
Subject: bug#41646: Startup in Windows is very slow when load-path contains many entries.
Date: Fri, 14 Aug 2020 22:07:15 +0300	[thread overview]
Message-ID: <837du1kpwc.fsf@gnu.org> (raw)
In-Reply-To: <87r1s92ld9.fsf@gnus.org> (message from Lars Ingebrigtsen on Fri,  14 Aug 2020 19:22:26 +0200)

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






  reply	other threads:[~2020-08-14 19:07 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
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 [this message]
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=837du1kpwc.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=41646@debbugs.gnu.org \
    --cc=larsi@gnus.org \
    --cc=nicolasbertolo@gmail.com \
    /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).