JDK-8004103 : sun.awt.X11.XToolkit.getScreenInsets() may be very slow
  • Type: Bug
  • Component: client-libs
  • Sub-Component: java.awt
  • Affected Version: 7u9
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: linux
  • Submitted: 2012-11-28
  • Updated: 2018-09-20
  • Resolved: 2018-09-20
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdResolved
Related Reports
Duplicate :  
Relates :  
Description
In some cases calling sun.awt.X11.XToolkit.getScreenInsets() may take a couple of seconds to complete. That means NetBeans IDE feels slow when e.g. opening popup menus.
The problem is not present when running with JDK 1.6

See also these NetBeans issues:
http://netbeans.org/bugzilla/show_bug.cgi?id=221862
http://netbeans.org/bugzilla/show_bug.cgi?id=219507
Comments
Probably we could stop the scan at certain window level and do not go too deep. But then the algorithm won't be reliable.
07-10-2015

I guess the issue appears on multi-monitor desktops when Xinerama is on. In that scenario we have to scan through all existing windows to collect screen insets and this may be slow.
07-10-2015

- this is an issue reported against 7(7u), - there are now affected version 9 filed for this issue - 7u issues are transferred to Sustaining Nevertheless if someone have a report against 9 - please reopen and add affectedVersion 9 or 7u specific escalations might be reopen to Sustaining
10-08-2014

- this is an issue reported against 7(7u), - there are now affected version 9 filed for this issue - 7u issues are transferred to Sustaining Nevertheless if someone have a report against 9 - please reopen and add affectedVersion 9 or 7u specific escalations might be reopen to Sustaining
10-08-2014

RT NOTE: Client (bulk) The criteria for deferral bulk request bugs: - Not P2 - Not tck-red - Not critical to customer Approved.
11-10-2013

jdk8: SQE OK to defer
10-10-2013

8-client-defer-candidate: the possible fix may be risky.
10-10-2013

The requested is provided. Please note that you can create such snapshots yourself - start NetBeans with required JDK version (use --jdkhome <fullpathtojdkfolder> command-line switch), click menu View - Toolbars - Memory to display memory toolbar, click Profile the IDE button in that toolbar. Perform some actions in the IDE then click the same button again. Profiler snapshot will open in the running IDE.
16-01-2013

Profiler snapshot when running NetBeans under JDK 1.6
16-01-2013

Great! Could you provide nps for jdk6 with the same scenario? I see that partly we are in XlibWrapper.XSync (1 sec) and partly in XlibWrapper.XGetWindowAttributes (1 sec) XAtom.getAtomData is wasting the last time. So, it would be good to compare the results.
18-12-2012

To reproduce run NetBeans and start clicking into its main menu. The drop down menus will appear noticeably slower when running with JDK 1.7 when compared to running NetBeans with JDK 1.6. You can also open this profile snapshot in NetBeans: http://netbeans.org/bugzilla/attachment.cgi?id=128249 - click menu Profile - Load Snapshot and browse the linked file. If you expand AWT-EventQueue-1 node all the way down to PopupFactory$ContainerPup.getContainerPopupArea() you will see that a call to XToolkit.getScreenInsets() took over three seconds.
17-12-2012

Please, describe how to reproduce the problem. The preferable way is to attach a simple test that shows the problem. I do not know what netbeans_jdk7.nps is and how it is intended to be used. Please describe it in this bug report. Please, enumerate steps that you did to reproduce the problem (1. Open NB, 2. Create a new project, etc.)
13-12-2012