Re: New Control Centre



El mar, 06-02-2007 a las 09:27 +0100, Vincent Untz escribi�> Lalalala, you're a total liar again ;-)

Damn.  It's this bad habit I have.

> Would be interesting to know why it takes 7 seconds, though. The menu
> should be preloaded, so only loading the icons should take time, but
> it's happening in an idle loop.

I haven't used the menus for a while (I'm on a main-menu slab now), but
the slab has pretty much the same behavior:  it's fast in the first few
runs, while the menus/icons are in memory.  If I then use my machine for
a while [read: Firefox and Evolution eat all the memory and the
menus/icons get paged out], then it becomes horribly slow on the next
invocation.  Then it gets paged in again, and it's fast until something
else pushes it out of memory.

I don't think it's only the menus/icons by themselves, though.  It's
probably also the code that got paged out, the file system metadata that
you need to read the menus/icons, etc.  Watch the thundering herd:

- you click on the main-menu button
- the page where the button's state is stored is paged out
- [delay for I/O]
- the page gets brought in
- the code to draw the main-menu is paged out
- [delay for I/O]
- the code gets paged in.  Now, it wants to refresh the icons/.desktop
items.  But first it frees the old structures.  The pages where they
live are paged out, and free() needs to page them in
- [delay for I/O]
- the code in GMenu and gnome-thumbnail is paged out
- [delay for I/O]
- it starts to scan the applications and thumbnail directories, and
their file system metadata is not in memory
- [delay for I/O]
- Now it has to actually re-read the .desktop files, so we do some more
seeking
- [delay for I/O]
- etc.

I'd love a way to monitor what the kernel pages in, and to have a way to
start/stop that monitoring at runtime [yes, it's called DTrace].  Then
you could ssh in remotely to your machine, and do this:

1. start the logging
2. click the main-menu
3. wait until everything refreshes
4. stop the logging

And then you could see what happened.  We'll hopefully see just how
scattered our code and data is.

  Federico




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