GC happens when object first becomes visible

Started by Irony, January 02, 2013, 10:32:13 PM

Previous topic - Next topic

Irony

I make an effort to avoid any active object creation during runtime or methods that create new objects internally.
However, as soon as a certain object becomes visible by moving into the viewing frustrum, there are several GCs happening causing a delay of ~200 ms. However, this only happens one time. When they move out of the frustrum or I hide them, and show them again, no more GCs happen.
Do any memory intensive things happen when an object becomes visible, and can I preload that somehow? I am already calling build().
There is nothing in the Log besides a lot of VBO creation, but disabling them did not help.

Irony

#1
<edit>nope, problem still there and the question is still valid. It runs smooth as butter but only after the objects first became visible.

Thomas.

It cases upload of texture to GPU memory. You can use TextureManager.preWarm(FrameBuffer) for upload all textures during the loading of your application.

Irony

Holy shit, this totally did the trick. Thank you so much!!