The ss was taken after the program had been running for about an hour.  I'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't doing that already.

Admittedly; most Java programmers have gotten lazy as we rely on the
compiler to much.

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.
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 "garbage collect" the cache by routinely investigating
how long it has been since each loaded file has been used, and deleting the
ones that haven't since the last sweep.

In this case, where the program is only playing a clip every 60 seconds, at
maximum, runtime response is not a factor.

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'll look at those results tonight.

I can not log onto the newsgroup from here ($@%$#@!$% 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 "stuff", like this email) but I am
preparing a post to the iPhone thread:  Let me know what you think.

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:
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'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's cherry pie,  etc.

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.

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 "If you like this, go download and play the full game, for free, at
blah"  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.

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.

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'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.


Finally, I am not on the developer email list, and would like to be added.
primary email:  coljlc1863 at hotmail.com
secondary email: jeremy.shupe at gmail.com

Thanx
Jeremy

On Mon, May 18, 2009 at 5:36 PM, James Cameron <quozl at us.netrek.org> wrote:

> On Mon, May 18, 2009 at 10:30:30AM -0400, Zachary Uram wrote:
> > Someone in IRC (I think it was Bob Tanner) mentioned that running the
> > poller application under OS X was eating up over 300MB of system
> > memory.
>
> Bob, take a look at OS X's Java VM for a hello world.  Exclude cache.
>
> > I talked to Jeremy and he said this should not be happening
> > and that there should not be any memory leaks in his app.
>
> Good.
>
> > Here is a
> > screenshot he sent me (he is running MS Windows Vista I think) showing
> > only 19MB of memory being used:
> >
> > http://www.jesujuva.org/mem-usage.jpg
>
> Irrelevant.  It is the trend that is important.  Measure the usage at
> hourly intervals.  Or if this was taken after some hours say so.
>
> I wouldn't be surprised to find it is a feature of the virtual machine
> in use.  Zach, why don't you load up a Java VM yourself and test it out,
> that way we'd get the Linux data point.
>
> As another data point, the metaget program that I use takes a peak of
> 2Mb virtual memory, 644Kb physical memory, and is 13k on disk.  The
> large difference between the on-disk size and the peak virtual memory
> size is caused by the very large C run time library.
>
> Jeremy, are you on the netrek-dev mailing list yet?
>
> --
> James Cameron    mailto:quozl at us.netrek.org     http://quozl.netrek.org/
>



-- 
Just because you are paranoid, doesn't mean the world isn't out to get you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.us.netrek.org/pipermail/netrek-dev/attachments/20090519/42064f77/attachment.htm