I recently spent a couple of days profiling our application.  Its a slow
process because JProbe cannot profile a project running in JIT mode, it has
to be running in interpreted mode.  It takes 40 minutes to get to my first
frame :)

Well anyway I found very little duplication of memory.  I had kind of
expected to see Texture2d objects being copied into a "retained" version or
some other sort of wasteful situation.  But interestingly enough of my
initial 45 MB footprint, 40 percent was floats and 35 percent was byte[]
from textures.  A chunk of those floats are from the hightmap and its
associated normals, the rest is all from geometry.

I also found where I was building lots of objects per-frame... especially in
my collision detection.  Let me tell you its really not good to be
constantly doing a new Vector3f(point) and new Point3f(vector) all over the
place... better to keep around a version and use the set() methods to move
coordinates around.  Seems like half the time I need a vector and half the
time I need a point.

Dave Yazel

-----Original Message-----
From: Nikolai V. Chr. [mailto:[EMAIL PROTECTED]]
Sent: Thursday, April 26, 2001 9:59 AM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Java3D bloats memory?


I started loading a big VRML97 scene into J3DFly, I discovered that
whenever I minimize the application the memory consumption goes to about
50-70 megabytes. But when I maximize it again and moves around a couple
of minutes, it quickly reaches 120 megabytes. If I once again minimize
J3DFly it instantly goes to about 50-70 megabytes.

If I don't show textures it is stable about 70 megabytes.

A normal VRML browser uses approx. 15megabytes, for the same scene!!

Now the first thing I did, was to blame the VRML97loader for doing
something wrong, BUT I then tried loading the sample city stored in j3d
format ... same problem.

My machine is   A900MHz, Geforce2 GTS32, 256Mb
                Win2000, Java 1.3, J3D 1.2.1


This seriously hinders Java3D from being usable in any serious context.
Now I understand why all Java3D examples I have come across was tiny
little scenes since Java3D bloats memory!

Can any of you reproduce the problem?

Is there anything to do about it?

If Sun know of this problem: will we have to wait a long time for it to
be solved, and do you have any idea of how long?

Can I in any way simulate the effect of minimizing my application to get
the memory consumption down? And why does it make such a difference to
minimize the app. since the memory doesn't bloat instantly when it is
restored again..

I tried running with incremental garbage collection, same problem.

Thanks for listening, and please help me anybody.
Nikolai

------------------------
Nikolai V. Christensen, Computer Engineer,
Simulation and Training department
IFAD, Forskerparken 10A, DK-5230 Odense M
Phone: +45 63 15 71 31 Fax: +45 65 93 29 99
http://www.ifad.dk
e-mail: [EMAIL PROTECTED]
------------------------

===========================================================================
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