How jmonkey engine module is optimized at the time of loading and using

if jmonkey engine is divide into
getting .blend into jmonkey
converting .blend into .j3o
scene graph creation
scene graph edition
–different operation on scene graph editing
nifty gui
handling animation

and lots more…

i know each of this module is optimizes at sub level
but i want to know how they are loaded,
use only when necessary
so that u dont run java out of memory exception

The classes, or objects, are available, and to that point are only consuming hard drive space until they are invoked. If you have a huge (10mb+) library, or jar, and invoke a class inside it with just a few variables, it will only consume that amount of memory. If, however, the invocation triggers all kinds of object creations and thus memory, that is the consequence of triggering the object you created.

So in essence it matters entirely on what that object does when it is created. The size of the library and its content is just pure hard drive space until invoked.

If you want to know more about how java manages its memory and how to avoid consuming large amounts, you only need to know what it is you are doing. Bits and bytes add up. In reality you should kind of already know the implications of you think about it :slight_smile:

The worst culprit so far as my experience has taught me in the gaming side is garbage collection and short lived objects. Update loops are your worst enemy if you don’t keep an eye on things.

Logging is another… Don’t not do it, just use levels appropriately. Turn it off for a speed run. You’d be surprised.

You’re apparently making several wrong assumptions here and then ask for an answer to a question that won’t solve your problem. Read the “how to get answers” doc linked above, it includes info on how to avoid such things.

You should have simply said that you have an issue with an out of memory exception and then show your code and error message. That way people can actually help you - now we can just ASSUME thats what happened. What we KNOW now is that you don’t have any idea about how Java memory management works.

1 Like

And to a lot of extents I’m wrong. It is a paragraph explaining about 30 years of code :confused:

Yeah, hard to stab at the dark :slight_smile: I suppose the correct answer to the question that was never asked is “run your java process with -Xmx=128m -XX:MaxDirectMemorySize=256M”