I recently switched from jME 3.0 to the current trunk version of jME 3.1.
Immediately after switching I noticed a massive lag/stutter when moving objects, but only when VSync is turned on or when the frame rate is fixed to 60 fps through the AppSettings class. I can reproduce this issue with a minimal test case (= a box moving from left to right). I also can see it in the Lemur demo when dragging a box around with the mouse.
As soon as I deactivate VSync everything works fine (fps >1000 ;-)).
Also: If I disable VSync and fixed frame rate, and simply add “Thread.sleep(16);” to the simpleUpdate() method of the application no lag/stutter is noticeable. The frame rate remains at 61 fps.
Now I realize that VSync and Thread.sleep(16) are two completely different things. I’d expect VSync to work better than a simple Thread.sleep(), though. But as a matter of fact it works a lot worse right now. And only since switching to jME 3.1.
While investigating the problem I logged several hundreds “tpf” values of the simpleUpdate() method calls. The tpf values don’t look very good. I’d expect tpf values of exactly 0.0166, with a deviation of maybe +/- 0.002. That’s completely not the case. I see values ranging from 0.001 to 0.045. The tpf values are basically all over the place. About 95% are around 16.66, though.
I already made sure it’s not a garbage collector problem, although jME seems to create some unnecessary objects for each frame rendered even for the most basic scenes.
Is this an already known issue? I neither found a forum entry nor an issue in github, but may overlooked something.