Re: [gtkmm] Memorysize?
- From: Jeff Gavin <jeff ezclick net>
- To: gtkmm-list gnome org
- Subject: Re: [gtkmm] Memorysize?
- Date: Sat, 07 Jun 2003 11:31:22 -0500
Leif Dyvik wrote:
> I just wrote a simple gtkmm/libglademm application with 3-4 widgets.
> And no more code than to load it and show it.
> And that app ate 10mb of memory. Is that normal?
FYI, My application is still a work in progress, maybe 50 widgets now
and it takes around 23MB of memory (just looking at the ps -aux numbers
mind you, not any serious memory analysis). Luckily, the amount of
memory an application takes up appears not to be directly proportional
to the number of widgets! Woot!
I used to work with embedded systems and memory utilization was always a
big concern. There never seemed to be enough memory, but we always
found ways to do without and still make the system work.
Some of the principles I used developing embedded systems still apply to
my GUI development. For example...
1. Get your priorities in order! Speed vs. Efficiency vs Maintenance.
Is speed more important to achieve a particular requirement? If so,
then maybe you will sacrifice some efficiencies in memory or even the
maintainability of your code.
Now, I don't know any of the developers of GTK+ or GTKMM, but I suspect
that they are concerned about speed, efficiency and maintainability, and
if not, that means there is room for a developer who is (maybe me or you
eh?). I have always been happy with the speed of the GTK+ widgets, even
when running on my now retired 500 MHz Celeron. Also, the memory size
of my gtkmm applications are in proportion with other GUI platforms I've
The cool thing about developing in GTK (or any other open source
library) is that when I discover a bug, efficiency, or maintenance
problem, I can then fix it, and immediately see the benefit of the
change. Of course I would then submit the bug/patch for everyone else!
Oops, I didn't mean to rant on like this, but I guess my point is that
while 10MB appears to be big, I suspect that most of that is GTK/GTKMM
overhead and that larger applications don't appear to grow 10 MB per
every few widgets.
> Other than that I like what i have seen so far.
So do I!
Jeffrey S. Gavin
> gtkmm-list mailing list
> gtkmm-list gnome org
] [Thread Prev