[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CVS Emacs on Windows XP takes 60 seconds to start
From: |
Eli Zaretskii |
Subject: |
Re: CVS Emacs on Windows XP takes 60 seconds to start |
Date: |
Wed, 03 Sep 2008 06:25:18 +0300 |
> From: Francis Litterio <address@hidden>
> 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.
- Re: CVS Emacs on Windows XP takes 60 seconds to start, (continued)
- Re: CVS Emacs on Windows XP takes 60 seconds to start, Eli Zaretskii, 2008/09/02
- Re: CVS Emacs on Windows XP takes 60 seconds to start, Francis Litterio, 2008/09/02
- Re: CVS Emacs on Windows XP takes 60 seconds to start, Francis Litterio, 2008/09/02
- Re: CVS Emacs on Windows XP takes 60 seconds to start, Jason Rumney, 2008/09/02
- Re: CVS Emacs on Windows XP takes 60 seconds to start, Francis Litterio, 2008/09/02
- Re: CVS Emacs on Windows XP takes 60 seconds to start, Francis Litterio, 2008/09/02
- Re: CVS Emacs on Windows XP takes 60 seconds to start, Eli Zaretskii, 2008/09/02
- Re: CVS Emacs on Windows XP takes 60 seconds to start,
Eli Zaretskii <=
- Re: CVS Emacs on Windows XP takes 60 seconds to start, Stefan Monnier, 2008/09/03
- Re: CVS Emacs on Windows XP takes 60 seconds to start, Eli Zaretskii, 2008/09/03
- Re: CVS Emacs on Windows XP takes 60 seconds to start, Stefan Monnier, 2008/09/03
- Re: CVS Emacs on Windows XP takes 60 seconds to start, Eli Zaretskii, 2008/09/03
- Re: CVS Emacs on Windows XP takes 60 seconds to start, Francis Litterio, 2008/09/03
- Re: CVS Emacs on Windows XP takes 60 seconds to start, Eli Zaretskii, 2008/09/03