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.
Linux (both i386/FC3 and amd64/FC4), JDK 1.6.0_b66, NB trunk from Jan 12 When adding J2SE platform the file chooser can be extremely slow. I have /usr/local/home configured as a mount point to a home server (NFS) and displaying of /usr/local folder in filechooser takes several (>5) seconds. During this time I see heavy network activity and the thread dumps shows that java.io.UnixFileSystem.getBooleanAttributes0(Native Method) is called. This method calls stat on a file. I am not sure how many calls we do here and wha files are searched but this can be found with strace.
Created attachment 28380 [details] typical stack trace
org.netbeans.modules.java.j2seplatform.J2SEInstallImpl does f.getFileObject("bin").getFileObject("java") for a given folder. Not sure if this is fast or slow.
The J2SEPlatformInstall detects if the folder contains JDK by: FileObject bin = f.getFileObject("bin"); if (f == null) return false; return bin.getFileObject("java") != null; It does some network ops on the NFS, but it should be 2 ops per folder.
The quoted code is surely more than 2 file ops per folder. If you care about speed, use java.io.File, not FileObject.
OK, the only thing I can do is to rewrite it to use File rather than FileObject. But I am not sure if it helps. Probably WANTFIX.
Radek improved speed of filesystems in NB 6.1, there is no reason to rewrite it to use java.io.File.