Bugzilla – Bug 230478
main-menu: pointless thumbnailing
Last modified: 2008-08-05 16:49:02 UTC
So - as we see in #229609# main-menu is causing a certain amount of thumbnailing to be done as people load their OO.o documents. I imagine this doesn't improve percieved performance of OO.o's load (& save?) (which is already slow ;-) It is slightly amazing that as we open a document this triggers a ~/.recently-used change, that triggers re-generating a thumbnail for the target file: even though the thumbnail will almost inevitably not be seen (surely) [ since most people use 'Favorites' exclusively it seems to me ] (and of course the main menu is not visible either). I suspect (though havn't checked) that the thumbnailing can be triggered by other actions - does repeated document saving generate new thumbnails ? [ hopefully not, but it'd be consistent at least ].
well, the thumbnailing needs to be done at some point. if we wait until the user opens the main menu then the user will have to wait for the thumbnailing at that point, which is worse for the user, no?
I'm going to jump in here. Agreed, assigning resources to thumbnailing when the app is still launching is sub-optimal. At what point is it to be done? Michael is suggesting "other actions". Let's name a few: - thumbnailing every time the document is loaded (status quo; slows document load) - thumbnailing at login (suboptimal; slows login) - thumbnailing at some interval after login (so as not to delay login) - thumbnailing at regular intervals (if the document has been changed in that interval, with such changes checked for at regular intervals). - thumbnailing at some interval after each document load/change (which may reduce the need to generate thumbnails for each save) If the thumbnailing is sufficiently niced, both in CPU and I/O, that may obviate the need for more fancy logic. It should be OK for document opening to trigger the thumbnailing, so long as the thumbnailing doesn't happen until the system is otherwise relatively idle.
Well - it depends how frequently you think 'recent-files' is used, I use it ~never since, well the combo box to change view is rather hard to use. OTOH - there is no need to block the recent-files UI while thumbnailing is done, it's done as a separate process AFAIR, and can (surely) update the image at the end (as in nautilus) [ is there not shared code to do that ? ]. Of course, if you think recent-files is used a lot - why not do an immediate thumbnail if it is selected ? otherwise not ? - presumably that gives a nice compromise ? :-)
During the Main Menu bug week (http://en.opensuse.org/GNOME/Main_menu_bug_week) I started to work on this, but didn't finish it. I'll attach a set of patches of the work I did. Basically, I started to fix it top-down: * Clean up switching of pages (pages were being switched twice when activated). * Centralize page switching. * Don't load tile tables at startup, only when needed. This still has several problems, as the main-menu won't know how big to make its window. We probably need to remember the last-used size (in terms of how many tiles to put in). Missing stuff: * Debug the above. * Don't try to thumbnail everything when loading a tile table. Only thumbnail the icons that will actually be shown.
Created attachment 203582 [details] Avoid switching pages twice
Created attachment 203583 [details] Centralize page switching
Created attachment 203584 [details] Reload the tile tables on demand, not at startup
Created attachment 203585 [details] Ensure the page selector buttons are visible
Created attachment 203586 [details] Avoid reloading tile tables unnecessarily
*** Bug 362953 has been marked as a duplicate of this bug. ***
*** Bug 348183 has been marked as a duplicate of this bug. ***
*** Bug 338024 has been marked as a duplicate of this bug. ***
Created attachment 206381 [details] gnome-main-menu-bnc230478-bnc364186-bnc350662-performance.diff This is the patch I submitted for openSUSE 11.0; it should appear in Beta1. This also contains fixes for bug #364186 and bug #350662. * Fri Apr 04 2008 - federico@novell.com - Added gnome-main-menu-bnc230478-bnc364186-bnc350662-performance.diff to fix these bugs: https://bugzilla.novell.com/show_bug.cgi?id=230478 - pointless thumbnailing https://bugzilla.novell.com/show_bug.cgi?id=364186 - main menu leaks https://bugzilla.novell.com/show_bug.cgi?id=350662 - improved startup time
Submitted.
Reopening so that I can submit a fix for openSUSE 10.3.
Assigning to Federico as per comment#16
This is fixed in openSUSE 11.0. We no longer do thumbnailing in gnome-main-menu there.