Text rendering memory issues



Hello all!

I'm developing GTK based software for an embedded environment. Now I'm thinking of migrating from GTK 1.2 to 2.x for its i18n functionality. It works nice, but the problem is memory consumption.

It seems some part of the glib/pango/gdk/gtk hierarchy allocates a large chunk of memory (approx 1 MB) when the first piece of text is rendered. For instance, on our system, an application with only a main window takes 636 kB; the same app with a single button+label takes 1620 kb; with two labeled buttons it consumes 1624kB.

I've tried snooping around in the code and on the Net, but I can't find anything useful. Does anyone know why this much memory is allocated? And if I knew where the memory is going, would I have any chance whatsoever to reduce the consumption? Is this "just" a matter of memory vs. performance, or is it by design?

I'm running the GTK suite on a Linux/XFree86 system. All libraries are built in their x11-versions. Pango uses the basic-x module. I have full control of all libraries, fonts, applications and configurations on the system, so if this problem can be solved by changing something outside the GTK-related stuff, I can do it.

Any clues, a pointer to docs, configuration options, code, whatever, are appreciated!

Regards,
Dag

_________________________________________________________________
Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963




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