Thanks for the detailed reply.

I broke my app down and found it was taking about 2 meg for all the 
controls/windows - the rest was due to my code or other modules. I'm 
considering using a new design approach were I'll be using child windows as 
containers for groups of controls - potentially there could be lots of these 
windows - roughly how much memory does a window use?

Cheers,

jez.

  ----- Original Message ----- 
  From: Stephen Pick 
  To: Jez White ; Win32-GUI 
  Sent: Tuesday, February 03, 2004 10:47 AM
  Subject: RE: [perl-win32-gui-users] Memory Usage


  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