gnome-main-menu r527 - branches/gnome-2-20/libslab



Author: federico
Date: Wed Nov 19 18:13:32 2008
New Revision: 527
URL: http://svn.gnome.org/viewvc/gnome-main-menu?rev=527&view=rev

Log:
bnc402256 - Don't generate thumbnails synchronously; let Nautilus handle that, as it has the async logic already
2008-07-28  Federico Mena Quintero  <federico novell com>

	Merged from trunk:

	https://bugzilla.novell.com/show_bug.cgi?id=402256 - Main-menu has
	high CPU usage on NIS/NFS home directories.

	* document-tile.c (load_image): Don't do thumbnailing ourselves,
	as we don't have the threading logic to do it in the background.
	Instead, let Nautilus handle thumbnailing by itself.

Signed-off-by: Federico Mena Quintero <federico gnu org>


Modified:
   branches/gnome-2-20/libslab/ChangeLog
   branches/gnome-2-20/libslab/document-tile.c

Modified: branches/gnome-2-20/libslab/document-tile.c
==============================================================================
--- branches/gnome-2-20/libslab/document-tile.c	(original)
+++ branches/gnome-2-20/libslab/document-tile.c	Wed Nov 19 18:13:32 2008
@@ -416,9 +416,6 @@
 {
 	DocumentTilePrivate *priv = DOCUMENT_TILE_GET_PRIVATE (tile);
 
-	GdkPixbuf *thumb;
-	gchar *thumb_path;
-
 	gchar *icon_id = NULL;
 	gboolean free_icon_id = TRUE;
 
@@ -432,32 +429,7 @@
 	if (! thumbnail_factory)
 		thumbnail_factory = gnome_thumbnail_factory_new (GNOME_THUMBNAIL_SIZE_NORMAL);
 
-	thumb_path = gnome_thumbnail_factory_lookup (thumbnail_factory, TILE (tile)->uri, priv->modified);
-
-	if (!thumb_path) {
-		if (
-			gnome_thumbnail_factory_can_thumbnail (
-				thumbnail_factory, TILE (tile)->uri, priv->mime_type, priv->modified)
-		) {
-			thumb = gnome_thumbnail_factory_generate_thumbnail (
-				thumbnail_factory, TILE (tile)->uri, priv->mime_type);
-
-			if (thumb) {
-				gnome_thumbnail_factory_save_thumbnail (
-					thumbnail_factory, thumb, TILE (tile)->uri, priv->modified);
-
-				icon_id = gnome_thumbnail_factory_lookup (
-					thumbnail_factory, TILE (tile)->uri, priv->modified);
-
-				g_object_unref (thumb);
-			}
-			else
-				gnome_thumbnail_factory_create_failed_thumbnail (
-					thumbnail_factory, TILE (tile)->uri, priv->modified);
-		}
-	}
-	else
-		icon_id = thumb_path;
+	icon_id = gnome_thumbnail_factory_lookup (thumbnail_factory, TILE (tile)->uri, priv->modified);
 
 	if (! icon_id)
 		icon_id = gnome_icon_lookup (



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