RFR: 8305578: X11GraphicsDevice.pGetBounds() is slow in remote X11 sessions

Maxim Kartashev mkartashev at openjdk.org
Tue Apr 11 07:00:31 UTC 2023


On Tue, 11 Apr 2023 00:06:04 GMT, Sergey Bylokhov <serb at openjdk.org> wrote:

> It would be good to know the exact function to check where it is used.

What was actually measured was the time AWT lock was being held. In `Java_sun_awt_X11GraphicsDevice_pGetBounds()` there are two such places:

                AWT_LOCK();
                xinInfo = (*XineramaQueryScreens)(awt_display, &locNumScr);
                AWT_UNLOCK();

and

            AWT_LOCK ();
            XGetWindowAttributes(awt_display, RootWindow(awt_display, screen),
                    &xwa);
            AWT_UNLOCK ();



While they could take a significant amount of time in a remote X session, I'm sure that the lock fairness and the presence of other operations that could've grabbed the lock are of equal importance. In other words, going further down to either of `XineramaQueryScreens()` or `XGetWindowAttributes()` will not help to isolate the root of the issue because they are but a part of a larger one.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/13346#issuecomment-1502777976



More information about the client-libs-dev mailing list