I have a renderer done in jogl that uses the GLEventListener model for making contexts current on the AWT thread, etc. I noticed that the duration of frames is wildly unstable, ranging from 50s to 1500s in simple scenes (generally in the 1000s, but then the slow frames made it jerky). When profiling the threads, it showed that my main thread and the AWT thread would alternate blocking each other (doesn’t seem good).
I then switched to using an active rendering approach to keep all rendering on my main thread. Besides a substantial performance boost, the frame rates were very stable (compared to before). Unfortunately, active rendering isn’t as well supported, or so the docs warn about, so I’d like to use the GLEventListener model.
I don’t have the multi-threading experience to track down what specifically causes the blocks. Does anyone have advice for debugging this situation?
Thanks