Re: Some performance notes



On Tue, 7 Aug 2001, Hans Breuer wrote:
> The magical "20 times slower" is almost visible if you compare the
> previous 'label' with the current one. Obviously the new one has to render
> much more, so it is a really unfair comparsion. But still I think it
> would be nice to get the factor five optimization for the 'auto-wrap 
> feature' by adding a new function pango_paragraph_balance () or the
> like. (Search for 'unbalanced' in gtklabel.c to find the unoptimized code)

Ok. I have a rewrite of the pango win32 backend on my local disk.
I'm running testgtk with all libraries compiled with debug. 
Here are the results i get with  testgtk --bench=labels:20

Original: (in cvs now)
labels		20	1311,0	509,4

My version:
labels		20	430,0	214,7

That is more than 300% speedup on the initial run and 237% on the 
following. And since i don't think debug mode hits the pangowin32 code 
that bad i think that the relative performance increase will be even 
larger when compiled without debug stuff.

Smokin!

Also, fixing the O(nē) linebreaking behaviour that pango currently has 
will help a bit when breaking long paragraphs, and should be very simple.

/ Alex






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