mirror of
https://github.com/dguglielmi/sunny-overlay.git
synced 2025-12-06 22:32:37 +01:00
38 lines
1.4 KiB
Diff
38 lines
1.4 KiB
Diff
From ee959d9d4611c820218b6f015734a7e4f86aedfd Mon Sep 17 00:00:00 2001
|
|
From: Bastien Nocera <hadess@hadess.net>
|
|
Date: Fri, 24 Apr 2015 17:17:36 +0200
|
|
Subject: grilo: Limit ourselves to running one thumbnailer at a time
|
|
|
|
Our thumbnailer currently doesn't have support for using hardware
|
|
decoding, so it's pretty CPU intensive. On my machine (i7 laptop with an
|
|
SSD), one thumbnailer would take about 40% of CPU. This causes both lag
|
|
when navigating the videos list, and carries on hampering video playback
|
|
if thumbnailing is started before playback.
|
|
|
|
This is good enough to mark this bug as fixed:
|
|
https://bugzilla.gnome.org/show_bug.cgi?id=748370
|
|
|
|
though a better solution would be to cancel thumbnailing in
|
|
totem_grilo_pause(), make sure that
|
|
gnome_desktop_thumbnail_path_for_uri() is cancellable, and try to
|
|
distinguish in totem-grilo.c between cancellation because the player is
|
|
getting shut down, and cancellation because we want all the resources to
|
|
go to the player.
|
|
|
|
diff --git a/src/icon-helpers.c b/src/icon-helpers.c
|
|
index feb15b3..f073f26 100644
|
|
--- a/src/icon-helpers.c
|
|
+++ b/src/icon-helpers.c
|
|
@@ -30,7 +30,7 @@
|
|
#define GNOME_DESKTOP_USE_UNSTABLE_API 1
|
|
#include <libgnome-desktop/gnome-desktop-thumbnail.h>
|
|
|
|
-#define DEFAULT_MAX_THREADS 5
|
|
+#define DEFAULT_MAX_THREADS 1
|
|
#define THUMB_SEARCH_SIZE 256
|
|
#define THUMB_SEARCH_HEIGHT (THUMB_SEARCH_SIZE / 4 * 3)
|
|
|
|
--
|
|
cgit v0.10.2
|
|
|