Re: Creating the desktop's menu bar takes 1 second

On Tue, 2006-03-14 at 22:42 -0600, Federico Mena Quintero wrote:
> Hi,
> I've been taking some more profiles of nautilus startup, and creating
> the menu bar for the desktop window takes around 1 second at login time.
> Of course, the desktop window has no visible menu bar :)
> Digging deeper, the culprit is this:
> nautilus_window_initialize_menus {
>   ...
>   if (!have_burn_uri ()) {    <---- see below
>      set_visible (NAUTILUS_ACTION_GO_TO_BURN_CD, FALSE);
>   }
> have_burn_uri() takes between 0.5 and 1.0 seconds, depending on whether
> we get preempted in the middle.  have_burn_uri() is expensive the first
> time, because it has to load in order to create a
> "burn:///" URI.  In addition, it has to spawn mapping-daemon due to the
> module's initialization function.  Given all the churn that happens
> during login, this can become really expensive, even with readahead
> files.
> Ideally, the desktop window shouldn't get a menubar/statusbar created
> for it at all.  In the meantime, here's a simple patch to avoid calling
> have_burn_uri() for the desktop window.  Is this OK to commit?

Yes. Please commit.

 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a fiendish zombie dwarf moving from town to town, helping folk in 
trouble. She's a time-travelling bisexual mechanic living homeless in New 
York's sewers. They fight crime! 

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