Bug 230478

Summary: main-menu: pointless thumbnailing
Product: [openSUSE] openSUSE 10.3 Reporter: Michael Meeks <mmeeks>
Component: GNOMEAssignee: Federico Mena Quintero <federico>
Status: RESOLVED FIXED QA Contact: E-mail List <nld10-bugs-qa>
Severity: Minor    
Priority: P5 - None CC: captain.magnus, federico, forgotten_CRPsQFwJ3b, mwelinder
Version: Final   
Target Milestone: ---   
Hardware: Other   
OS: SLED 10   
Whiteboard: gnomeup-gnome-main-menu
Found By: Other Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---
Bug Depends on:    
Bug Blocks: 349357    
Attachments: Avoid switching pages twice
Centralize page switching
Reload the tile tables on demand, not at startup
Ensure the page selector buttons are visible
Avoid reloading tile tables unnecessarily
gnome-main-menu-bnc230478-bnc364186-bnc350662-performance.diff

Description Michael Meeks 2006-12-22 10:09:01 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 ].
Comment 1 James Krehl 2007-01-04 17:37:30 UTC
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?
Comment 2 Mark Gordon 2007-01-04 18:53:19 UTC
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.
Comment 3 Michael Meeks 2007-01-04 19:00:14 UTC
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 ? :-)
Comment 5 Federico Mena Quintero 2008-03-24 17:25:09 UTC
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.
Comment 6 Federico Mena Quintero 2008-03-24 17:26:05 UTC
Created attachment 203582 [details]
Avoid switching pages twice
Comment 7 Federico Mena Quintero 2008-03-24 17:26:40 UTC
Created attachment 203583 [details]
Centralize page switching
Comment 8 Federico Mena Quintero 2008-03-24 17:27:19 UTC
Created attachment 203584 [details]
Reload the tile tables on demand, not at startup
Comment 9 Federico Mena Quintero 2008-03-24 17:27:44 UTC
Created attachment 203585 [details]
Ensure the page selector buttons are visible
Comment 10 Federico Mena Quintero 2008-03-24 17:28:08 UTC
Created attachment 203586 [details]
Avoid reloading tile tables unnecessarily
Comment 11 Federico Mena Quintero 2008-04-01 00:44:38 UTC
*** Bug 362953 has been marked as a duplicate of this bug. ***
Comment 12 Federico Mena Quintero 2008-04-01 00:45:41 UTC
*** Bug 348183 has been marked as a duplicate of this bug. ***
Comment 13 Federico Mena Quintero 2008-04-01 00:57:07 UTC
*** Bug 338024 has been marked as a duplicate of this bug. ***
Comment 14 Federico Mena Quintero 2008-04-05 05:00:54 UTC
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
Comment 15 Federico Mena Quintero 2008-04-05 05:01:46 UTC
Submitted.
Comment 16 Federico Mena Quintero 2008-04-08 01:14:05 UTC
Reopening so that I can submit a fix for openSUSE 10.3.
Comment 17 Magnus Boman 2008-04-30 02:53:09 UTC
Assigning to Federico as per comment#16
Comment 18 Federico Mena Quintero 2008-08-05 16:49:02 UTC
This is fixed in openSUSE 11.0.  We no longer do thumbnailing in gnome-main-menu there.