[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    Re: KFontCombo speed
From:       Lars Knoll <knoll () kde ! org>
Date:       2001-07-25 13:07:02
[Download RAW message or body]

On Wednesday 25 July 2001 14:53, Malte Starostik wrote:
> On Dienstag, 24. Juli 2001 22:55, Rik Hemsley wrote:
> > #if Martijn Klingens
> >
> > > On Tuesday 24 July 2001 16:53, Rik Hemsley wrote:
> > > > Anyone have an idea how to work around the sluggishness ?
> > >
> > > Does it paint only what is visible, or does it preprocess all entries
> > > upon initializing?
> >
> > It paints only what is visible, so if you scroll then it blocks while
> > it renders the strings for the currently visible section.
> >
> > After about 5 minutes of scrolling up and down, all fonts are rendered
> > and it is fast :}
>
> The ctor reads in the font list, and the actual QFont and QFontMetrics are
> instantiated on first rendering.
> Would it improve performance and/or memory usage if it cached a QPixmap
> instead of the QFont?

You'd still need to create the font once. If you do this, you'd need to cache 
the pixmap globally for all KDE apps, so that it doesn't happen again on the 
next app using the combo box.

Lars

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic