<div>The ss was taken after the program had been running for about an hour.  I&#39;ve looked at it after it has been running for several hours and noticed a small uptick in the memory useage.  Zach told me that there are peeps complaining that it was taking up to 300 mb.  I looked over the code, and cannot understand that assertion.  There are, however,  things I could do to make the code more efficient, such as variable reuse, assuming that the compiler isn&#39;t doing that already.</div>

<div> </div>
<div>Admittedly; most Java programmers have gotten lazy as we rely on the compiler to much.</div>
<div> </div>
<div>Another thing that I can do to minimize the memory footprint is not pre-load the audio clip objects.  I actually have 2 sound engines, one for small apps, such as this, that pre loads the audio clips into memory and calls them as needed.  The other engine maintains a cache, it checks the cache and plays the clip if it finds it there, if not, it creates the file, plays it, and inserts it into the cache.</div>

<div>This means that only files that are being used are loaded into memory.  This frees up memory in exchange for runtime response.  As an added feature the engine also tries to &quot;garbage collect&quot; the cache by routinely investigating how long it has been since each loaded file has been used, and deleting the ones that haven&#39;t since the last sweep.</div>

<div> </div>
<div>In this case, where the program is only playing a clip every 60 seconds, at maximum, runtime response is not a factor.</div>
<div> </div>
<div>All told, however, I can not understand how the program might have swelled to 300 megs of memory usage.  I am trying to do a methodical analysis today, tracking memory usage over time.  So I&#39;ll look at those results tonight.</div>

<div> </div>
<div>I can not log onto the newsgroup from here (<a href="mailto:$@%$#@!$%">$@%$#@!$%</a> web nanny, I seriously need to set up a vpn tunnel to my home machine, but then again, even with the nanny I do blow lots of time on &quot;stuff&quot;, like this email) but I am preparing a post to the iPhone thread:  Let me know what you think.</div>

<div> </div>
<div>I had similar thoughts when Microsoft allowed ordinary hacks to program games for the xbox.  (Netrek on the xbox, COOL!!)  Peeps in this thread are assuming a full client, although there has been mention of a stand alone single player version.  My thoughts on this subject are this:</div>

<div>1.  The single player version is the best option.  Everybody is assuming a full blown client.  That opens a huge can of worms.  There are issues involved such as airtime (You don&#39;t think the cell companies are going to let iPhone users play Netrek without charging for something, bandwidth, airtime, oxygen, ... do you?).  Play balance, a cell phone user will get their asses handed to them, get frustrated and regret not spending that $1 that they paid for the app on a McDonald&#39;s cherry pie,  etc.</div>

<div> </div>
<div>If, however, we created a scaled down single player version, say a universe with a total of 10 planets, for example 5 Ori, and 5 Fed, then there are allot of possibilities.  Messaging would be dead and the galactic map could take the space used by the messaging and player windows.</div>

<div> </div>
<div>The point behind this version, would be to get people interested in Netrek, and to get them some sort of practical training.  All the time that they are playing, or maybe at launch and closing, we would be sending messages such as &quot;If you like this, go download and play the full game, for free, at blah&quot;  A portion of the peeps would go home, download the game, and join the community.  If that was even 1/2 of 1% of iPhone users that would still be a huge increase of new blood.</div>

<div> </div>
<div>In short, I am taking the middle road between the opinions issued here.  That yes, a iPhone, or handheld version of the game is appropriate, but that that version should not be a full blown client, and should be used primarily as a recuiting and training tool.</div>

<div> </div>
<div>2. Now we are talking $$$.  Money make people crazy.  What must be stated clearly BEFORE work begins on such a project is who gets the proceeds, and how those proceeds will be spent.  I don&#39;t know who developed the code base.  My assumption is that the number of contributors is at least several score, if not over a hundred.  Before anyone proceeds on such a venture they need to be covered to ensure that those individuals are not going to sue for a cut of the pie.</div>

<div> </div>
<div> </div>
<div>Finally, I am not on the developer email list, and would like to be added.</div>
<div>primary email:  <a href="mailto:coljlc1863@hotmail.com">coljlc1863@hotmail.com</a></div>
<div>secondary email: <a href="mailto:jeremy.shupe@gmail.com">jeremy.shupe@gmail.com</a></div>
<div> </div>
<div>Thanx</div>
<div>Jeremy<br><br></div>
<div class="gmail_quote">On Mon, May 18, 2009 at 5:36 PM, James Cameron <span dir="ltr">&lt;<a href="mailto:quozl@us.netrek.org">quozl@us.netrek.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="im">On Mon, May 18, 2009 at 10:30:30AM -0400, Zachary Uram wrote:<br>&gt; Someone in IRC (I think it was Bob Tanner) mentioned that running the<br>&gt; poller application under OS X was eating up over 300MB of system<br>
&gt; memory.<br><br></div>Bob, take a look at OS X&#39;s Java VM for a hello world.  Exclude cache.<br>
<div class="im"><br>&gt; I talked to Jeremy and he said this should not be happening<br>&gt; and that there should not be any memory leaks in his app.<br><br></div>Good.<br>
<div class="im"><br>&gt; Here is a<br>&gt; screenshot he sent me (he is running MS Windows Vista I think) showing<br>&gt; only 19MB of memory being used:<br>&gt;<br>&gt; <a href="http://www.jesujuva.org/mem-usage.jpg" target="_blank">http://www.jesujuva.org/mem-usage.jpg</a><br>
<br></div>Irrelevant.  It is the trend that is important.  Measure the usage at<br>hourly intervals.  Or if this was taken after some hours say so.<br><br>I wouldn&#39;t be surprised to find it is a feature of the virtual machine<br>
in use.  Zach, why don&#39;t you load up a Java VM yourself and test it out,<br>that way we&#39;d get the Linux data point.<br><br>As another data point, the metaget program that I use takes a peak of<br>2Mb virtual memory, 644Kb physical memory, and is 13k on disk.  The<br>
large difference between the on-disk size and the peak virtual memory<br>size is caused by the very large C run time library.<br><br>Jeremy, are you on the netrek-dev mailing list yet?<br><font color="#888888"><br>--<br>James Cameron    mailto:<a href="mailto:quozl@us.netrek.org">quozl@us.netrek.org</a>     <a href="http://quozl.netrek.org/" target="_blank">http://quozl.netrek.org/</a><br>
</font></blockquote></div><br><br clear="all">
<div></div><br>-- <br>Just because you are paranoid, doesn&#39;t mean the world isn&#39;t out to get you.<br>