Re: Speeding up thumbnail generation (like multi threaded). Thoughts please.



On 08/30/2009 09:51 AM, jcupitt gmail com wrote:
able to supply pixels at a certain size. In particular, libjpeg can do
a very quick load-at-1/8th-size read where it just decompresses enough
to be able to get the DC component of each 8x8 block. If you use
libjpeg like this you can expect around a 100x speedup of the
decompress step.
The gdk-pixbuf jpeg loader does this already.

The key is to improve the generic down-scaling routines in gdk-pixbuf, as noted here:
http://bugzilla.gnome.org/show_bug.cgi?id=80925

The scaling routines are currently quite bad at downscaling by large factors.
For example, last year I used a test folder that had four 15000x400 tif 
images and four 15000x400 png images (solid colors). Nautilus took 4 
minutes and 30 seconds to thumbnail the folder.
I then patched gdk-pixbuf to do scaling in two steps (scale by root-N 
twice, instead of scale by N). With this approach, Nautilus took 8 
seconds. See http://bugzilla.gnome.org/show_bug.cgi?id=522803 for details.
I'm not saying that is a good approach (the quality would be poor for 
line drawings, for example, but OK for photos). But it shows that there 
is lots of room for improvement!
- Mike



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