Very slow popup rendering to remote display when xinerame package is installed
Submitted by Martynas
Assigned to Xorg Project Team
Description
Created attachment 94827 Dockerfile to reproduce the issue
When forwarding Java Swing application to a remote display it takes a considerable amount of time (up to 5 seconds) for GUI popups to show up.
I have found that this issue only occurs when remote system has libxinerama1 package installed.
I created a dockerfile which setups environment for easy reproduction of this issue.
To reproduce:
- tar xzf xinerama-slow-remote-popup.tar.gz
- cd xinerama-slow-remote-popup
- sudo docker build -t x11 .
- sudo docker run -i -t -p 522:22 x11 /bin/bash
- service ssh start
In the new terminal window:
- cd xinerama-slow-remote-popup
- ssh -X -p 522 -i files/home/martynas/.ssh/id_rsa martynas@localhost
- /opt/jdk1.7.0_51/bin/javac SimpleExample.java
- /opt/jdk1.7.0_51/bin/java SimpleExample
GUI window shows up quite fast. When clicked on the menu bar, popup shows instantly.
Now lets install Xinerama and start that program again. In the first terminal window:
- apt-get install libxinerama1
In the second terminal window:
- Ctrl + C
- /opt/jdk1.7.0_51/bin/java SimpleExample
It takes much more longer to load. Also when clicked on a menu button not only application window becomes unresponsive, but other windows on the local machine become unresponsive as well.
When looking at the Java stack trace during the hiccup, it seems that most of the time is spent in the sun.awt.X11.XlibWrapper.XGetWindowAttributes native java call. However this is as deep as I am able to dig.
Any comments, or workaround suggestions?
Attachment 94827, "Dockerfile to reproduce the issue":
xinerama-slow-remote-popup.tar.gz