[patch] Preload popup menus for the desktop (3.5)

George Staikos staikos at kde.org
Thu Mar 30 03:12:39 BST 2006

On Wednesday 29 March 2006 20:35, Scott Wheeler wrote:
> Here's one that will no doubt be at least semi-controversial, but for me I
> believe solves a significant issue for first impressions in KDE.
> The right menu button on the desktop is slow.  Really slow.  In my
> profiling here (on a fast machine) it took between 250 - 750 ms to pop up. 
> Waiting 3/4 of a second for a RMB menu on a text file just seems silly.
> The same issue applies in Konqueror and if this is accepted I'll probably
> address it there too.
> The basics of what this does are:
> - Use a QCache to store up to 50 menus in memory
> - Create the menu as soon as the user is over the item with the mouse
> - When the RMB is pressed, check the cache first for the menu
> Of course in some cases, if the user very quickly uses the RMB button on an
> item that they've never hovered over before there can still be a delay, but
> in practice there's usually a short delay before the right mouse button is
> pressed and in the course of a desktop session most of the time menus are
> reused (i.e. trash, home, etc.)
> This makes the desktop feel much more responsive in general, and I'd like
> permission to commit it to 3.5.

  What do you think the slowness is from?  If there is XMLGUI involved here, I 
suspect the XML parsing for sure.

George Staikos
KDE Developer				http://www.kde.org/
Staikos Computing Services Inc.		http://www.staikos.net/

More information about the kde-core-devel mailing list