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 171107 - 22s in JFileChooser waiting for Java(?)
Summary: 22s in JFileChooser waiting for Java(?)
Status: VERIFIED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Platform (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Tomas Zezula
URL: http://statistics.netbeans.org/except...
Keywords:
Depends on:
Blocks:
 
Reported: 2009-08-28 22:02 UTC by sudhansutiwari
Modified: 2009-09-03 08:45 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 157252


Attachments
nps snapshot (7.66 KB, bin/nps)
2009-08-28 22:02 UTC, sudhansutiwari
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sudhansutiwari 2009-08-28 22:02:28 UTC
Build: NetBeans IDE Dev (Build 200908022240)
VM: Java HotSpot(TM) Client VM, 14.0-b16, Java(TM) SE Runtime Environment, 1.6.0_14-b08
OS: Windows Vista, 6.0, x86
Maximum slowness yet reported was 22111 ms, average is 22111
Comment 1 sudhansutiwari 2009-08-28 22:02:32 UTC
Created attachment 86803 [details]
nps snapshot
Comment 2 Jaroslav Tulach 2009-08-31 09:49:26 UTC
The JFileChooser waits for some Future. As far as I can tell it is the Future that is executed in "Swing Shell" 
thread. It spends a lot of time in java.api.common.project.ui.LibraryNode (at least 7 invocations, but see the 
FileUtil.isArchive file which has at least 92 invocations).

I am not sure if this can be fixed in java or file chooser. Thus I am CCing platform UI guys and assigning to java.
Comment 3 Tomas Zezula 2009-08-31 13:28:07 UTC
Fixed (workaround) in jet-main: 85b0c89b8e93
Comment 4 Jaroslav Tulach 2009-08-31 14:28:24 UTC
Quick and interesting fix. The new behaviour will be faster. It is not going to be 100% same as it used to (but I care 
only about performance, don't I?).
Comment 5 Tomas Zezula 2009-08-31 14:37:53 UTC
Yes, it's not as exact as it was. On the other side we don't support anything else than jar (war). There is no other solution how to speed up the FileFilter which 
is synchronous (has to return the result). I removed the need to open each file and check if it starts with PK...
Comment 6 Quality Engineering 2009-09-03 08:45:01 UTC
Integrated into 'main-golden', will be available in build *200909021401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/85b0c89b8e93
User: Tomas Zezula <tzezula@netbeans.org>
Log: #171107:22s in JFileChooser waiting for Java(?)