Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (533)
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 1262 times)
0 Members and 1 Guest are viewing this topic.
Offline kit

Senior Newbie




Doing 3D on a _global_ scale :-)


« Posted 2003-03-26 13: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 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:

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
www.the-athenaeum.org/javatest/earthtest.php . Be gentle; I'm a newbie.  :-)
Offline Orangy Tang

JGO Kernel


Medals: 56
Projects: 11


Monkey for a head


« Reply #1 - Posted 2003-03-26 14: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..


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

Junior Member




Java games rock!


« Reply #2 - Posted 2003-03-26 15: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 .....in 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 Member




for great justice!


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

If you take a look over at http://www.j3d.org 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  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

pw (25 views)
2014-07-24 01:59:36

Riven (25 views)
2014-07-23 21:16:32

Riven (19 views)
2014-07-23 21:07:15

Riven (22 views)
2014-07-23 20:56:16

ctomni231 (51 views)
2014-07-18 06:55:21

Zero Volt (46 views)
2014-07-17 23:47:54

danieldean (37 views)
2014-07-17 23:41:23

MustardPeter (40 views)
2014-07-16 23:30:00

Cero (56 views)
2014-07-16 00:42:17

Riven (55 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org 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‑gaming.org
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!