Hey guys - thanks for reading a newbie post.
I am fairly well-versed in Java, and new to Java 3D. I have started a project to connect a 3D representation of the earth with information in a database. Eventually, I want to have a zoom-able globe, where the user can select points and attach information to them. The info will then be stored in a PostgreSQL db.
But all that I currently have is a small demo, with a spinning earth. You can find it at http://www.the-athenaeum.org/javatest/earthtest.php
I can post the code if you like, but basically it is EarthApp.java from the texture tutorial (chapter 6) with the most recent version of Java 3D. I have changed the code to work on a web site (ie, loading the file from a URL rather than a file object), made the display size a bit bigger, and switched in a higher resolution JPEG from NASA.
Here’s my problem. The JPEG I’m using is 302KB. But when I run the application (which just has one spinning sphere object mapped with that one texture), it appears to suck up 70MB of memory! I am guessing this by watching Mozilla’s memory in the Windows 2000 task manager. It starts off at about 20-25MB. But when I load the page with my demo, it shoots up to about 95MB. I also doesn’t appear to let go of the memory when I close the page (it finally releases the memory when I close Mozilla completely).
I am independently looking at some of the optimization pages out there, but there are a lot of topics to go through. Could some of you guys get me started on understanding:
-
How to get a rough estimate of “reasonable” memory usage based on the number of objects, size of textures involved, etc.
-
What “obvious” optimizations might get rid of my “dumb mistakes”.
Like I said, I am also looking elsewhere, but I thought your experience could give me a head start. I can also post the complete code if that will help.
Thanks in advance for helping a newbie,
Chris McCormick