[KimDaBa] Multithreaded image loader?

Robert L Krawitz rlk at alum.mit.edu
Mon Jan 10 20:43:45 CET 2005


   From: "Jesper K. Pedersen" <blackie at blackie.dk>
   Date: Mon, 10 Jan 2005 20:50:46 +0100

   On Monday 10 January 2005 14:24, Robert L Krawitz wrote:
   | I notice a comment in the image manager that the image loader can't be
   | made multithreaded because the JPEG loader isn't MT-safe.  Is this an
   | issue in the JPEG library or somewhere else?  Particularly (but not
   | exclusively) on an SMP/CMP or HT system, multithreading the loader
   | might offer a significant performance improvement.

   I removed the mutex from the code, and tries starting multiple
   image loaders, but I couldn't really tell any difference.

   To try it out, cvs up to HEAD, and apply this patch
   Let me know if you see any significant difference.

So I don't believe this to be my performance problem, after all.

I was trying to figure out how to test it, and I decided that one way
would be to time how long it took to scroll all the way from the top
to the bottom of all 6800 of my photos, by simply holding down the
page down key.  It ran slower and slower (the scrollbar moved slower
and slower), and eventually ground to a halt.  At that point, I found
my machine had ground to a halt!  I eventually managed to get a root
shell, and found that my kimdaba process had grown to 800 MB,
consuming all of my swap along the way.  Unfortunately, I wasn't able
to put a debugger on it.

What it *looks* like is happening is that the load queue is getting
badly backed up, and somehow everything then goes wrong.

-- 
Robert Krawitz                                     <rlk at alum.mit.edu>

Tall Clubs International  --  http://www.tall.org/ or 1-888-IM-TALL-2
Member of the League for Programming Freedom -- mail lpf at uunet.uu.net
Project lead for Gimp Print   --    http://gimp-print.sourceforge.net

"Linux doesn't dictate how I work, I dictate how Linux works."
--Eric Crampton



More information about the KimDaBa mailing list