Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  Java memory footprint ...  (Read 1457 times)
0 Members and 1 Guest are viewing this topic.
Offline andyl

JGO n00b
*

Posts: 43


Java games rock!


« on: 2003-01-20 04:06:32 »

An old one this - but I haven't been around Java for about 6 months.

Are Sun doing anything about the memory footprint of Java (esp. Swing) apps? I just loaded up SwingSet2 under JRE1.4.1_01, only to be appalled to see 69MB of memory being swallowed up. And this app doesn't even do anything useful! This is unreal.

Angry
Offline Herkules

JGO Kernel
*****

Posts: 1522
Medals: 1


Friendly fire isn't friendly!


« Reply #1 on: 2003-01-20 05:00:36 »

No, it's real. But this is a biased value. We have a really large Java/Swing app satisfied with 64MB as well. So don't be afraid.

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline princec
« League of Dukes »

JGO Kernel
*****

Posts: 8088
Medals: 95


Eh? Who? What? ... Me?


« Reply #2 on: 2003-01-20 06:59:09 »

Microsoft Word is a behemoth of an application, but I note that it only takes up 8MB when loaded...

The general Java overhead is still quite high and one of Swing's Achilles' heels is the fact that it creates so much stuff for an apparently very simple end result.

My game takes up 21.5MB so far while it's running and there's not even a teeny bit of AWT in it. Only about 6MB of that is heap; there's 1MB of sound, 1MB of graphics, a few MB of .DLLs for OpenGL etc, and 3MB for (my) bytecode. Then there's rt.jar classes and VM overhead: compiled code, hotspot profiling information, a bit of free heap, some stack, and the Sun .dlls. If I added a Swing front end to it I can see my memory requirements doubling and no longer being able to fit comfortably on a low-end machine.

There's a rumour that we'll get a Java execution service with the 1.5 release which will move all executing Java code into one process and cut most of that overhead out for concurrent executions but that doesn't cut the straight-up 6MB overhead that you can't escape from. Here's hoping...

Cas Smiley

Games published by our own members! Go get 'em!
Offline Herkules

JGO Kernel
*****

Posts: 1522
Medals: 1


Friendly fire isn't friendly!


« Reply #3 on: 2003-01-20 07:11:34 »

What do we learn? If you make a Java app, make a big one! Better don't make a set of tiny utilities...

HARDCODE    --     DRTS/FlyingGuns/JPilot/JXInput  --    skype me: joerg.plewe
Offline princec
« League of Dukes »

JGO Kernel
*****

Posts: 8088
Medals: 95


Eh? Who? What? ... Me?


« Reply #4 on: 2003-01-20 15:05:43 »

Cheesy Roll Eyes Grin

Cas Smiley  

Offline andyl

JGO n00b
*

Posts: 43


Java games rock!


« Reply #5 on: 2003-01-20 15:44:34 »

Looks like you can't write a small application, so I'd have to agree with that.

Smiley
Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.108 seconds with 20 queries.