performance optimizations

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

 



On Tue, 2004-10-12 at 12:18 +0300, Jakub Pavelek wrote:
> Hi all,
> 
> we have had a look at our performance with Fontconfig 2.2.96 and have
> some questions:
> 
> 1) there seems to be a huge number of strcmp operations when handling
> the fonts. In my test run I got over a million of such comparisons
> originated form Fontconfig! Element names are compared again and again.
> Do we feel this should be optimized? Does anyone work on that already?

What kind of operations are using? Even better, could you create a 
small benchmark that simulates what your program is doing?

There are certainly some things that are known slow - the fact that
all FcFontMatch operations involve a linear scan could be improved
by adding some hash table indices. (There's a bug in bugzilla about
that.) But I'm a little surprised of 1 million + strcmps if you
are working with a small number of fonts.

I don't really know of any work being done. For desktop performance
memory usage and startup time is definitely people's main concern
with fontconfig at the moment. That's partly because common toolkits
(Pango and I think also Qt) have higher levels of caching above 
fontconfig.

> 2) The usage of floating point types. Those matching results are
> "double" even though majority of comparisons do not return any real
> floating point value. Not a problem on x86 but when run on ARM this
> becomes really bad really fast.
> Should we think about optimizations here too? Anyone working on that
> already?

I haven't heard of anybody working on that.

It's probably possible to replace the doubles with strcol-style sort
keys or similar, though it will certainly not help performance where
doubles *are available.

Regards,
						Owen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://freedesktop.org/pipermail/fontconfig/attachments/20041012/16d44c7a/attachment.pgp

[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux