all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Francis Litterio <flitterio@gmail.com>
Cc: emacs-devel@gnu.org
Subject: Re: CVS Emacs on Windows XP takes 60 seconds to start
Date: Wed, 03 Sep 2008 06:25:18 +0300	[thread overview]
Message-ID: <uzlmp7vxd.fsf@gnu.org> (raw)
In-Reply-To: <ud4jmw6ya.fsf@gmail.com>

> From: Francis Litterio <flitterio@gmail.com>
> Date: Tue, 02 Sep 2008 17:50:59 -0400
> 
> >   if (!(NILP (Vw32_get_true_file_attributes)
> > 	|| (EQ (Vw32_get_true_file_attributes, Qlocal)
> > 	    && devtype != DRIVE_FIXED && devtype != DRIVE_RAMDISK))
> >       /* No access rights required to get info.  */
> >       && (fh = CreateFile (name, 0, 0, NULL, OPEN_EXISTING,
> > 			   FILE_FLAG_BACKUP_SEMANTICS, NULL))
> >          != INVALID_HANDLE_VALUE)
> >
> > to always evaluate to zero, thus bypassing the code in the block that
> > follows the `if' clause and calls get_file_owner_and_group.
> 
> Eli,
> 
> I changed the above condition to:
> 
>    if (0)
> 
> and rebuilt.  The resulting emacs.exe starts immediately (both "emacs
> -q" and "emacs -Q"), and there are no RPC calls made to any external
> host when Emacs is starting.

Thanks.  I have one more request, assuming you can run Emacs under a
debugger: with the above condition enabled (i.e. revert the code to
what it is in the CVS), can you please verify that lookup_account_sid
is called by `stat' exactly twice during startup: once for the user
who owns the Emacs installation tree (probably you), and one more time
for the primary group of that user.  The rest of files that `stat' is
called for should not cause a call to lookup_account_sid, but instead
should get their user and group name and ID from the cache maintained
by w32_add_to_cache and w32_cached_id.  I'd like to make sure that the
calls to lookup_account_sid are kept to their bare minimum, as
intended, and that there's no bug in the code which handles that part.

Beyond that, I intend to make changes in the code such that the file
security information is requested only when the caller of `stat'
really needs that.  The absolute majority of `stat' calls during
startup come from functions like `file-exists-p' and `load' (via
`openp') that only need to know if the file exists and is a
directory.  I want to modify code so that Emacs doesn't even try to
call lookup_account_sid on behalf of these callers.  This should bring
down the startup time even for situations such as yours, where a
firewall blocks access to LDAP.

Thanks for working on this.




  parent reply	other threads:[~2008-09-03  3:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-09-02 19:45 CVS Emacs on Windows XP takes 60 seconds to start Francis Litterio
2008-09-02 20:14 ` Lennart Borgman (gmail)
2008-09-02 20:16   ` Francis Litterio
2008-09-02 20:30     ` Eli Zaretskii
2008-09-02 20:55       ` Francis Litterio
2008-09-02 21:18         ` Francis Litterio
2008-09-02 21:19         ` Lennart Borgman (gmail)
2008-09-02 21:19       ` Eli Zaretskii
2008-09-02 21:50         ` Francis Litterio
2008-09-03  0:41           ` Francis Litterio
2008-09-03  0:57             ` Jason Rumney
2008-09-03  1:04               ` Francis Litterio
2008-09-03  3:04               ` Francis Litterio
2008-09-03  3:28             ` Eli Zaretskii
2008-09-03  3:25           ` Eli Zaretskii [this message]
2008-09-03 14:30             ` Stefan Monnier
2008-09-03 18:24               ` Eli Zaretskii
2008-09-03 18:40                 ` Stefan Monnier
2008-09-03 19:00                   ` Eli Zaretskii
2008-09-03 15:14             ` Francis Litterio
2008-09-03 18:19               ` Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=uzlmp7vxd.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=flitterio@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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.