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 108348 - Libary Manager Browse Jar/File takes ~15 seconds , FileChooser too slow
Summary: Libary Manager Browse Jar/File takes ~15 seconds , FileChooser too slow
Status: RESOLVED WONTFIX
Alias: None
Product: platform
Classification: Unclassified
Component: Window System (show other bugs)
Version: 6.x
Hardware: All Windows XP
: P2 blocker (vote)
Assignee: David Simonek
URL:
Keywords: L&F, PERFORMANCE
: 108349 111187 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-06-28 01:22 UTC by _ krystyna
Modified: 2008-12-22 14:56 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
thread dumps (49.71 KB, application/octet-stream)
2007-06-29 02:56 UTC, _ krystyna
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ krystyna 2007-06-28 01:22:53 UTC
M10 Standard installer
XP
JDK1.6.0_02

Takes about 15 seconds on M10 to bring up just the Browse Jar/Folder dialog of the Library Manager.
On 5.5.1 it takes less than 2 seconds. I've seen this with Class Libraries or Theme Libraries.

1. Start IDE and from main menu Tools-> Libraries
2. Highlight select Class Libraries or Theme Libraries, then press New Library.
3. Accept default "My Library" , OK. then in Library Manager dialog press "Add Jar/Folder"
>here is where it takes approx. 15 seconds before the Browse Jar/Folder dialog comes up.
Comment 1 Marian Mirilovic 2007-06-28 07:46:18 UTC
*** Issue 108349 has been marked as a duplicate of this issue. ***
Comment 2 Jiri Rechtacek 2007-06-28 08:04:11 UTC
I'm know what is the correct component: projects/libraries or core/swing?
Comment 3 Jiri Rechtacek 2007-06-28 08:10:13 UTC
_I don't know_ what is the correct component: projects/libraries or core/swing?
Comment 4 Tomas Zezula 2007-06-28 09:03:51 UTC
Unfortunately I cannot help you. The Libraries panel only calls JFileChooser chooser = new JFileChooser();
chooser.showOpenDialog(this). The rest is on the JDK and OS. There may be problem with some broken network drive or in
Windows places. Can you generate 2 successive thread dumps when you wait for the dialog, from these thread dumps it
should be clear what is the problem.
Comment 5 _ krystyna 2007-06-29 02:55:11 UTC
Attaching requested thread dumps. Disconnected computer from network (all connections including wireless disabled for 
the test).
Comment 6 _ krystyna 2007-06-29 02:56:09 UTC
Created attachment 44557 [details]
thread dumps
Comment 7 Tomas Zezula 2007-06-29 07:38:06 UTC
All the time is spent in the Win32ShellFolder2 (there is something broken in your shell folder). The client (the
libraries module) cannot affect this code. Reassigning to core/swing, the only solution which comes in my mind is to
turn off the shell folder.
Comment 8 David Simonek 2007-07-09 15:19:59 UTC
krystyna, could you please try to reproduce with jfc/FileChooserDemo or SwingSet2 demo in JDK? Just be sure to set L&F
to WIn L&F so that ShellFolder comes into action.

If seems that either your file system isn't in good shape or there is some bug deep in awt. Reopen with more details,
thanks.
Comment 9 _ krystyna 2007-07-09 23:01:57 UTC
-Ran jfc/FileChooserDemo with jdk1.6.0_02 with both Windows and Windows Classic L&F and saw maximum of about 4 seconds
 (and this was when switching from Metal to Windows or first instantiation). 
-Retested NB today and got 13 seconds for the "Browse JAR/Folder" to come up on today's build
 NetBeans IDE Dev (Build 200707090000) Java: 1.6.0_02-ea; Java HotSpot(TM) Client VM 1.6.0_02-ea-b02 System: Windows XP
version 5.1 running on x86; Cp1252; en_US (nb)
-Sandip C. saw this JDK bug with similar stack trace: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5033747 
-See also http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6372808
Comment 10 David Simonek 2007-07-10 12:31:34 UTC
Thanks for pointers to JDK bugs, it explains a lot, especially this comment in 6372808:

--------
I'm developing a work around as follows:

We made a ShellFolderManager2 class that extends Win32ShellFolderManager2.  It overrides one method and uses a little
bit of reflection so it does exactly the same thing the existing class does, but it does NOT call isDirectory() on files
that end in ".zip".

It's definitely a hack, but [pending more testing] it appears to be a big improvement.  I'd love to get some feedback on
it (both in testing and in general design); contact me if you're interested.

Submitted On 05-JUN-2007
Adi_8312

I confirm the result's of Endre's investigation. Large compressed files are the couse of the problem.
---------

So it seems we are out of luck here, it's AWT problem.
If the problem appears critical for many customers, we should consider removing windows shell folder by
putClientProperty("FileChooser.useShellFolder", Boolean.FALSE);

Comment 11 _ krystyna 2007-07-10 22:25:03 UTC
This is definitely a JDK1.6.0_02 issue. I tested with JDK1.6.0_01 as well as JDK -> 1.5.0_11 
and the dialogs come up within ~ 2 seconds. I added an SR (service request) to the JDK bug. 
Comment 12 David Simonek 2007-07-11 09:17:38 UTC
Great, thanks for careful evaluation.
Comment 13 Marian Mirilovic 2007-07-17 12:36:28 UTC
*** Issue 109703 has been marked as a duplicate of this issue. ***
Comment 14 Jesse Glick 2007-07-27 20:32:50 UTC
*** Issue 111187 has been marked as a duplicate of this issue. ***