Re: Nautilus startup variability



On Tue, 2006-07-25 at 23:48 -0400, Phillip Ezolt wrote:

>    For SOC, I've been trying to track down why the nautilus startup
> time is so variable.  I have a theory that nautilus blocks waiting for
> its dependencies to start (bonobo-activation-server,
> gnome-volume-manager, gnome-vfs-daemon).  While it is blocking, a
> WHOLE bunch of other things start and prevent nautilus from getting
> the CPU again.

If Nautilus causes things like bonobo-activation-server and
gnome-vfs-daemon to be launched, you'll still have to wait the same
amount of time even if you launch them beforehand.  This is unless you
manage to parallelize their startup with something else, but that's kind
of hard since they are very low-level daemons anyway.

>   (including the bazillion things that the panel may launch).  It
> really is important (IMHO), that nautilus is started and running as
> soon as possible.  Even if the entire gnome desktop takes a while to
> start up, just seeing your icons makes startup feel faster. 

You may want to play with the priorities in gnome-session.  Check your
~/.gnome2/session and tweak the priorities - things with the same
priority get launched in parallel, and things with lower numbers get
launched before things with higher ones.  Gnome-session will wait for
clients to register back (i.e. when they say, "I'm done loading"), and
then it will launch the next set of programs.  Right now Nautilus and
the Panel are both at priority 40.

>    1) Start bonobo-activation-server at the beginning of gnome-session
> (rather than on-demand) (this way it can run in parallel to gconf
> loading) 

Both b-a-s and Gconf read a ton of files scattered around the disk... do
take some measurements to see if this is worthwhile :)

>    2) Start gnome-volume-daemon and gnome-vfs-daemon within
> gnome-session.

That's certainly a possibility.

>    3) Don't start nautilus until gnome-volume-daemon and
> gnome-vfs-daemon are ready. (This will involve devising some way to
> determine that they are ready, and I can start nautilus) 

Fortunately, you don't need to do anything for this.
Bonobo-activation-server will simply make Nautilus block if it requests
that gnome-vfs-daemon be launched again and the previous one isn't done
registering.

> Questions for desktop-devel:
>    1) Is there a simple function call to start the
> bonobo-activation-server from gnome-session? 

You can probably just run bonobo_activation_query() with a meaningless
query to make it start up.

>    2) Is there a simple function call to start gnome-volume-monitor
> and gnome-vfs-daemon (rather than have it done on-demand)? 

I don't know about gnome-volume-monitor.  For gnome-vfs-daemon, call
gnome_vfs_get_volume_monitor().
 
>    3) How will I know that gnome-volume-monitor and gnome-vfs-daemon
> are ready? (so that I can start nautilus)?

You don't need to.  When trying to (re)launch the daemons, nautilus will
block if they aren't finished loading.

> BTW. Right now, I'm just looking for quick hacks to see if this path
> does in fact gain us anything. The real solution will come later if
> this pans out. 

Did you figure out why Nautilus waits for about a second from the time
it hits the main loop until it actually paints the desktop?

  Federico




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