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

On Wed, 2009-09-30 at 12:58 +0200, Mark wrote:
> > Its faster because it uses a simpler algorithm, so its not generally
> > useful, however it might be nice to allow it optionally, like adding a
> > new filter type and let you pass in a filter to the scaling loader.
> the filter structure in glib seems... extremely complex.
> Lets first just make this FAST before we (or i) start try to make this
> as a new filter type.
> Also i think the bilinear filter type is just fine for me since it's
> just that only faster.

glib, you mean gdk-pixbuf? And what do you mean by FAST? The gdk-pixbuf
implementation is a bilinear filter, which inherently is more expensive
than the simple filter in scale_down_pixbuf. scale_down_pixbuf() is
really a pretty bad filter for most usecases, but it doesn't matter much
for the thumbnailing case.

> >> note that the scaling performance is just a minor part of the complete
> >> picture. If the loading/saving of files could be made faster in any
> >> way that would give the most speed boosts.
> >
> > Yes indeed. File load speed is very important here, but there really
> > isn't that much you can do on the app side.
> And is there anything possible in glib?
> The thing i noticed in earlier posts (from late last month in this
> thread) is that there is a big usage of gpointers... so perhaps it's
> possible to optimize something there?

gpointers? Not sure what you are talking about. The problem is inherent
in the fact that it needs to do i/o reading bits from rotating media.

> >> As for "full optimization" to make it worse.. all my benchmarks where
> >> ren in debug compile mode. So not representative if did for one test
> >> but i did that for all tests so that probably makes it fair again..?
> >
> > Only if you compiled your gdk-pixbuf library with debug mode, and even
> > then its not certain because it has assembler versions of the scaler i
> > think.
> >
> > It would be fair if you used the optimized version of
> > gnome_desktop_thumbnail_scale_down_pixbuf() from libgnomedesktop though.
> >
> >
> That is this one right:
> ....? that is the one i included in the benchmark. If that isn't the
> one you mean then which one is it? (link please)

Yes, that is the source code, but if you use the copy in libgnomedesktop
it will be built with optimization, if you use the copy in your code it
will be built with no optimization.

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