[referencer] startup time

Zhi-Wei Huang zwhuang at gmail.com
Sat Apr 4 00:18:51 EDT 2009


Hi,

On Mon, Dec 1, 2008 at 12:24 AM, Giorgos Michalogiorgakis
<giorgis.m at gmail.com> wrote:
> Hello list,
>
>  I apologize for the probably misleading subject.  I have a small problem
> with the amount of time referencer needs to start.  In an older machine it
> takes about 8-10 secs to start for a ~1500 papers library.  Most of the
> time seems to be related to thumbnails.  Starting from the command line
> there are many messages like
>
> Couldn't find
> thumbnail:'file:///home/giorgos/bibliography/arxiv/pdf/2005/01/0501109.pdf'
>  or
>
> Has valid failed
> thumbnail: 'file:///home/giorgos/bibliography/arxiv/pdf/2004/10/0410076.pdf'
>
> As I only use the list view and never the icon view, is there a way to not
> check for thumbnails at startup?

you can modify src/ThumbnailGenerator.C to disable the "lookupThumb"
function. The following is the patch code:

diff -r e477f85683a5 src/ThumbnailGenerator.C
--- a/src/ThumbnailGenerator.C	Sun Mar 08 17:50:56 2009 +0000
+++ b/src/ThumbnailGenerator.C	Sat Apr 04 12:13:06 2009 +0800
@@ -45,28 +45,28 @@
 			continue;
 		}
 		
-		Glib::RefPtr<Gdk::Pixbuf> result;
-		gdk_threads_enter ();
-		result = lookupThumb (file);
-		gdk_threads_leave ();
-		
-		if (result) {
-			gdk_threads_enter ();
-			taskLock_.lock ();
-
-			typedef std::multimap<Glib::ustring, Document*>::iterator Iterator;
-			const std::pair<Iterator,Iterator> docs = taskList_.equal_range(file);
-			for (Iterator i = docs.first; i!= docs.second; ++i) {
-				Document *doc = i->second;
-				doc->setThumbnail (result);
-			}
-
-			taskList_.erase (file);
-
-			taskLock_.unlock ();
-			gdk_threads_leave ();
-			sleep (0.1);
-		}
+//Z		Glib::RefPtr<Gdk::Pixbuf> result;
+//Z		gdk_threads_enter ();
+//Z		result = lookupThumb (file);
+//Z		gdk_threads_leave ();
+//Z		
+//Z		if (result) {
+//Z			gdk_threads_enter ();
+//Z			taskLock_.lock ();
+//Z
+//Z			typedef std::multimap<Glib::ustring, Document*>::iterator Iterator;
+//Z			const std::pair<Iterator,Iterator> docs = taskList_.equal_range(file);
+//Z			for (Iterator i = docs.first; i!= docs.second; ++i) {
+//Z				Document *doc = i->second;
+//Z				doc->setThumbnail (result);
+//Z			}
+//Z
+//Z			taskList_.erase (file);
+//Z
+//Z			taskLock_.unlock ();
+//Z			gdk_threads_leave ();
+//Z			sleep (0.1);
+//Z		}
 	}
 }

>
> By the way, I really like this project, keep up the good work!
>
> Thanks,
> Giorgos
>
> ---
> To unsubscribe, send a blank email to referencer-unsubscribe at icculus.org
> Mailing list archives: http://icculus.org/cgi-bin/ezmlm/ezmlm-cgi?60
>
>
>

regards,
Huang


More information about the referencer mailing list