Framerate drop with JME3 on Mousevent

Hi there,

I have a JME3 Canvas inside a Swing Window. I am creating a large custom mesh >1.000.000 and I’m rendering it at ~45 frames. I have a listener class that implements RawInputListener to do some CameraNode translations and rotations onMouseMotionEvent.

When I’m holding a button and move the mouse the fps then grind almost to a halt at 2-3 fps. When I release the MouseButton again it climbs to ~45 again.

The mesh is visibly all the time, so it’s not like it got clipped before.

Do you have any ideas what causes this? Is camera rotation that expensive? (I hope this isn’t some threading problem…)

Just a wild guess, but are you triggering some update when holding down the mouse button? Like recalculating bounding volumes or stuff like that?

kardinal: Dude, exactly. I just saw this myself (in fact, my boss did in the fraction of a second, talk about embarrassment)