I'm not really up to going through code in detail, but from everything I've heard if 
you want to keep a close eye on what is using resources where you want to take a look 
at JUnit ( http://www.junit.org/index.htm ) which is the standard open-source java 
unit testing tool. It is highly recommended as a way of working out what is happening 
where.

-ben

-----Original Message-----
From: greg baboolal [mailto:[EMAIL PROTECTED]]
Sent: 21 January 2003 10:26
To: [EMAIL PROTECTED]
Subject: [JAVA3D] A little help with code / system resource efficiency


Hi,

I am trying to develop a billiard table system, and
still in its early stages.

At present there are only a few balls scattered around
the table.

When loading the app I notice that it initially takes
approximately 26,232k of memory.

after a couple of shots, depending on the strength of
the cue action etc it would then use about 42,000k.

The bit that is puzzling me is that when I reset the
table the sys resources do not return to anything near
its initial 26,000k (remains around 40,000k).

When resetting the applet I reset the table by
removing all the child BilliardBall(s) and set the
simulations thread to null.

I don't think that any reference to the child balls is
maintained as I initiate purely as addChild(new BB())
and only access them by iterating over the parent TG.

This is my first time trying to take care about the
system resources invovled and short of calling
System.gc() everywhere possible (the height of my
understanding) I wonder if someone can take a look and
guide me better with its structure. I think as a
starting point would be in the main Billiards file
function: resetAnimation().

The app is viewable at
http://users.wmin.ac.uk/~w9707382/applet.html

and the app + code stuff in a zip:
http://users.wmin.ac.uk/~w9707382/Billiards.zip

I am eventually going to be extending the number of
balls on the table so I would like to try an achieve
an effecient implementation for this end of year
project.( to aim the cue ball click on the white ball
).

Comments welcome, please.

Greg.

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

==========================================================================To 
unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to