Login  Register

Major performance regression in context makeCurrent() from 2.3.2 to 2.4.0

Posted by hil23Ak on Apr 01, 2021; 9:24pm
URL: https://forum.jogamp.org/Major-performance-regression-in-context-makeCurrent-from-2-3-2-to-2-4-0-tp4041078.html

I have an application that can have an arbitrary number of NewtCanvasAWT's, each with an associated Animator thread and GLWindow context. These contexts are all shared with a permanent "master" context that is created as a dummy GLAutoDrawable from createDummyAutoDrawable().

Sidenote: I do not currently use setExclusiveContext() with the Animator threads because occasionally a draw will be invoked through the Swing EDT.

This system works very well in 2.3.2 even with many contexts. However, in 2.4.0 I am getting massive hangs when the library tries to make context current. Here is a sample call stack from where 80% of the application time is spent in wglMakeCurrent():



Did something change in 2.4.0 in how contexts are managed? Using setExclusiveContext() helps significantly but still does not reach 2.3.2 performance (while also removing rendering flexibility).