Bug 1293855 - Delay in launching of Java menu over ssh X forwarding session
Delay in launching of Java menu over ssh X forwarding session
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: java-1.8.0-openjdk (Show other bugs)
All Linux
medium Severity medium
: rc
: ---
Assigned To: Mario Torre
BaseOS QE - Apps
Depends On:
Blocks: 1269194
  Show dependency treegraph
Reported: 2015-12-23 04:38 EST by Ashish Shah
Modified: 2016-08-26 13:24 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2016-08-26 13:24:36 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Ashish Shah 2015-12-23 04:38:58 EST
Description of problem:

Java menu are launched slower over ssh X forwarding session.
Problem is observe only while connecting from system with dual screen.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Login in GUI session with dual (or multi head) monitors
2. ssh -X user@remote-host
3. java -jar Acento.jar
4. Click on any menu item of the applet.

Actual results:

The menu is launched after delay of a second or so.

Expected results:

Menu should pop instantly.

Additional info:

Problem is observed only with multi monitor setup at ssh client end.
Came across this upstream bug -> https://bugs.openjdk.java.net/browse/JDK-8074200
Comment 3 A. Fernando 2015-12-24 08:47:41 EST
Problem can be reproduceable with the latest version of Oracle JDK (jdk-8u66-linux-x64).
Comment 5 Mario Torre 2016-01-11 12:13:00 EST
On my system is a bit difficult to notice, but I was able to profile a simpler test application with Byteman and Thermostat and I see that indeed there is a lag in JMenu.setPopupMenuVisible. While part of the lag is probably due to the network overhead, I can observe a delay even when running the application on the local machine with xinerama.

The same application in single screen mode behaves with a lag of around 1ms while with two monitors it takes around 5 to 7ms, while the worse case on remote ssh is around 150ms.

I tracked down the issue to multiple calls to XToolkit.getScreenInsetsManually, so this is indeed the same issue as http://bugs.java.com/bugdatabase/view_bug.do?bug_id=8004103

I'll debug a bit more to see if I can fine tune the place where the actual lag accumulates, and devise a safer fix, but as per the original bug conclusion I don't know if this will be fixable without breaking other things, so quite likely this won't be fixed for java 8.
Comment 6 Deepak Bhole 2016-08-26 12:28:39 EDT
I spoke to Mario about this and unfortunately this is a non-trivial fix and not something we can fix easily without risking destabilizing the codebase. I am going to NAK it for fix in current OpenJDK versions.
Comment 7 RHEL Product and Program Management 2016-08-26 13:24:36 EDT
Development Management has reviewed and declined this request.
You may appeal this decision by reopening this request.

Note You need to log in before you can comment on or make changes to this bug.