Yep, there's a "PERLWIN32GUI_USERDATA" structure for every control and window. 
This structure is chunky, and has references off to other structures in it, 
such as window names, cursors, accelerator tables, NEM events, etc. It could 
probably be optimized down.
 
The reason it uses more memory is that it supports and does more stuff. When 
you're writing an application to do, say, a calculator, you know exactly what 
buttons and windows you want, where you want them, and what you're doing, so 
you can build your C windowing code around your final goal. When you compile 
it, things get optimized even more by the compiler. With Win32::GUI there is no 
"final goal" and everything the Perl coder could conceivably want to do has to 
be supported, making it's footprint quite large.
 
Steve

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Jez White
Sent: 29 January 2004 09:51
To: Win32-GUI
Subject: [perl-win32-gui-users] Memory Usage


Hi,
 
I've noticed that my app uses lots of memory on start up (35 M) compared to 
other "similar" applications (around 12 M) I'm on XP. I've got lots of windows 
and controls which are created at the start - is there Win32::GUI memory 
overhead for each control/window? Or should I start considering this as some 
sort of bug in my code?
 
Cheers,
 
jez.

Reply via email to