As BrowserUk points out things are not as bad as they seem with Win32::GUI as it is a wrapper over inevitably loaded DLLs. If you read the terminal services blurb here it notes that some resources are cloned and some shared. I think it is highly likely that perl.exe/perl.dll will get cloned so you are up for 2MB there as a minimum. This is not that bad when you compare it to other options.

However I don't think the problem is as big as you believe as a process that does something, then sleeps for a while is likely to get paged to disk so if you had 50 4-8 MB processes running asyncronously in different sessions the actual RAM hit at any given time will not be that bad (far less than a pure multiple). The less often the widget widgets the less the issue.

Rather than just rely on Windows and paging to deal with it one option would be to get the widget to explicitly schedule itself with at.exe so it runs, updates at.exe to fire it up again in x minutes and then explicitly exits.

Another option might be to run a single process on the terminal server that groks a list of user sessions, checks whatever remote file you are supposed to check per user and then issue cute little pop up window warnings on the remote machines via NET SEND

NET SEND {name | * | /DOMAIN[:name] | /USERS} message NET SEND Administrator Just another perl hacker!

Unless you actually need to download the file to the users session that should do what you want and avoids the multiple instance problem fullstop.


In reply to Re^3: Memory requirements for a Win32 GUI by tachyon-II
in thread Memory requirements for a Win32 GUI by pvbcharon

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.