This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 188001

Summary: 41s in JFileChooser.showOpenDialog
Product: platform Reporter: a.gerhard
Component: JDK ProblemsAssignee: Stanislav Aubrecht <saubrecht>
Status: RESOLVED WONTFIX    
Severity: normal CC: anebuzelsky, bobo_of_id, Chiana, exceptions_reporter, jaska_tl, javydreamercsw, jimmgrogan, MackSix, mkleint, sreimers
Priority: P3 Keywords: PERFORMANCE
Version: 6.x   
Hardware: All   
OS: All   
URL: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8022057
Issue Type: DEFECT Exception Reporter: 158792
Attachments: nps snapshot

Description a.gerhard 2010-06-23 14:22:25 UTC
Build: NetBeans IDE 6.8 (Build 200912041610)
VM: Java HotSpot(TM) Client VM, 16.3-b01, Java(TM) SE Runtime Environment, 1.6.0_20-b02
OS: Windows XP
Maximum slowness yet reported was 41614 ms, average is 24705
Comment 1 a.gerhard 2010-06-23 14:22:29 UTC
Created attachment 100363 [details]
nps snapshot
Comment 2 Tomas Zezula 2010-06-23 14:41:52 UTC
The BrokenReferenceCustomizer just calls JFileChooser.showDialog which has to be done in EDT.
The thread is blocked in the WindowsFileChooserUI.WindowsFileWiew.getIcon()
Comment 3 Jaroslav Tulach 2010-06-30 05:38:24 UTC
JFileChooser on windows calls:

com.sun.java.swing.plaf.windows.WindowsFileChooserUI$WindowsFileView.getIcon()

which may get into

sun.awt.shell.Win32ShellFolderManager2$ComInvoker.invoke()

and block on 

java.util.concurrent.FutureTask.get()

which probably waits on "Swing Shell" thread. That thread may be computing for really long time. The AWT thread shall not block for such long running background threads.
Comment 4 Jaroslav Tulach 2010-07-12 13:12:45 UTC
In case you don't know how to reproduce slow behavior of 
  sun.awt.shell.Win32ShellFolder2.getIconIndex[native]()
method, try to slow its call down by inserting  
  Thread.sleep(10000);
into it. Then the "Swing-Shell" thread shall be really slow and the chances of blocking the "AWT-EventThread" inside
  sun.awt.shell.Win32ShellFolder2.getIcon()
shall be much higher, imho.
Comment 5 Antonin Nebuzelsky 2011-10-06 08:37:22 UTC
*** Bug 194005 has been marked as a duplicate of this bug. ***
Comment 6 Petr Cyhelsky 2012-10-02 10:46:28 UTC
*** Bug 219310 has been marked as a duplicate of this bug. ***
Comment 7 Jaroslav Tulach 2013-07-09 09:37:28 UTC
*** Bug 230540 has been marked as a duplicate of this bug. ***
Comment 8 Ondrej Vrabec 2013-07-10 10:20:25 UTC
*** Bug 222397 has been marked as a duplicate of this bug. ***
Comment 9 Antonin Nebuzelsky 2013-12-27 15:45:32 UTC
*** Bug 234159 has been marked as a duplicate of this bug. ***