Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (777)
Games in Android Showcase (231)
games submitted by our members
Games in WIP (856)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  <Newbie> - HUGE memory usage for small web app?  (Read 2507 times)
0 Members and 1 Guest are viewing this topic.
Offline kit

Senior Newbie

Doing 3D on a _global_ scale :-)

« Posted 2003-03-26 12:50:54 »

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

I can post the code if you like, but basically it is 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:

1. How to get a rough estimate of "reasonable" memory usage based on the number of objects, size of textures involved, etc.

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

- Check out the 3D earth program I'm working on, at . Be gentle; I'm a newbie.  :-)
Offline Orangy Tang

JGO Kernel

Medals: 57
Projects: 11

Monkey for a head

« Reply #1 - Posted 2003-03-26 13:47:45 »

This is pretty much common behaviour for j3d, it tends to land-grab large amounts of memory - even for small apps. This mainly seems to be that it was intended to scale well, so you could probably test a huge scene and get only a minimal increase in memory. Theres also a known bug where it will not release the memory properly on exit which you may be stumbling across, (anyone know if this is fixed yet?).

In short, don't worry about it yet. Keep an eye on the memory usage as you extend your app and you'll probably not see much of an increase..

[ - Play Growth Spurt, Rescue Squad and Snowman Village ] [ Rebirth - game resource library ]
Offline Daath

Junior Devvie

Java games rock!

« Reply #2 - Posted 2003-03-26 14:54:05 »

well I see nothing normal about that - and would not right away blame it on java3d - I am running one of my terrrain demos and using (1) texture 1.4 Meg on it and it starts with 25 Meg and stays that way until I close it other demo I   am getting about same amount of memory consumption but I am loading 256 terrain tiles(shapes3d) each having 2 textures - so it amount to at least 20times more then you are using ....
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Breakfast

Senior Devvie

for great justice!

« Reply #3 - Posted 2003-03-26 19:41:27 »

If you take a look over at you will find a set of tips to maximise performance with Java 3d. I'm not sure whether there is anything there that helps this specifically but it will probably explain it somewhere.
Pages: [1]
  ignore  |  Print  

hadezbladez (334 views)
2018-11-16 13:46:03

hadezbladez (176 views)
2018-11-16 13:41:33

hadezbladez (334 views)
2018-11-16 13:35:35

hadezbladez (80 views)
2018-11-16 13:32:03

EgonOlsen (2174 views)
2018-06-10 19:43:48

EgonOlsen (2202 views)
2018-06-10 19:43:44

EgonOlsen (1375 views)
2018-06-10 19:43:20

DesertCoockie (2007 views)
2018-05-13 18:23:11

nelsongames (1644 views)
2018-04-24 18:15:36

nelsongames (2294 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!