Re: Pango Speed

On Wed, 2004-05-05 at 04:49, zitan wrote:
> Hi again list,
> I have not been able to improve the speed of this pango code myself, so I am definately still 
> looking for suggestions.  I am using this code in a web environment so I really need it to be as fast as possible.  
> Can anyone tell me if a second is slow for creating a fontmap, setting the context and getting the pixel width? 
> What is causing the time length?  Is it because of creating a new fontmap object and setting the resolution?  

On my (1Ghz) machine Pango can get the width of ~25,000 10 character
strings in a second.

The two things that are going to be slow are:

 - Initializing fontconfig initially
 - Creating a new fontmap

1 second is pretty slow though in general even for this startup
overhead. One thing you should try is running 'fc-cache -f' (as root)
... it may be that fontconfig is having to go through all your fonts
each time it starts up. Reducing the number of fonts on your system will
also reduce fontconfig startup time overhead a lot.

> If so is there some way I could create a object once, and then reuse this object?  Is there anything I can do 
> to optimise the code or my pango installation?  

This is really a question of web programming. Perhaps you want to write
a persistant server that does the Pango computations and just make your
CGIs talk to that.


Attachment: signature.asc
Description: This is a digitally signed message part

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