I've recently recognized that my JOGL programs slow down significantly over time. After analyzing my code I found that calls to glMapBuffer seem to be the source of the slow down.
I've prepared a minimalistic test case. It basically sets up a VBO with space for 3 float values. In the display method I do nothing else than mapping the VBO and writing 3 float values to it; no actual rendering takes place. I do this 100 times per frame to make the slow down noticeable more quickly.
When you run the test case you will see that the rendering time per frame increases significantly within less than a minute. If tested on Windows 7 (64bit), Ubuntu 13.04 (64bit) with both NVIDIA and AMD cards.
A work-around to the problem is to NOT use glMapBuffer, and instead use glBufferData to create a new buffer with the new data.
I'd appreciate if the JOGL maintainers could look into this and advise me if I'm doing something wrong or maybe fix the problem if it's on the JOGL side.
Thanks a lot!
GlMapBufferTest.java