Re: UI Review Suggestions - Preference Dialogs



On Wed, 20 Nov 2002, Alexander Larsson wrote:

> On Tue, 19 Nov 2002, Havoc Pennington wrote:
> 
> > On Tue, Nov 19, 2002 at 09:11:10PM -0500, Sean Middleditch wrote: 
> > > The image previews *are* slow, even on my Athlon 1800+.  (Granted, they
> > > don't seem any slower on a PII 500 at work or a Duron 900 laptop.)  I
> > > don't understand why it takes so long for the previews to be generated,
> > > I would think them to be relatively simple and quick quick operations...
> > > If the previews could be sped up to be as fast as I imagine they can be,
> > > perhaps there wouldn't be such a need for alternatives.
> > > 
> > 
> > Note that scaling down in gdk-pixbuf is kind of butt slow. Alex had
> > some faster routines, I don't know if we're using them here.
> 
> Try switching it to using gnome_thumbnail_scale_down_pixbuf() from 
> libgnomeui. It might help a lot.

Doing that helped a bit, but it would be a lot better if it didn't read 
the pixbuf from the file and scale it down separately for each button. 
*sigh*

You want to 
a) load the image once
b) scale it down to the largest size needed (for the select button) while 
   keeping aspect ratio the same as the original.
c) scale the pre-scaled image as needed for each button

That and using gnome_thumbnail_scale_down_pixbuf() should speed it up at 
least by a factor of ten.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 Alexander Larsson                                            Red Hat, Inc 
                   alexl redhat com    alla lysator liu se 
He's a suicidal native American cop with a robot buddy named Sparky. She's a 
scantily clad Bolivian lawyer living homeless in New York's sewers. They fight 
crime! 




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