Bug 225277 - org.netbeans.modules.favorites.Actions$Add.chooseFileObject: LowPerformance took 7770 ms.
org.netbeans.modules.favorites.Actions$Add.chooseFileObject: LowPerformance t...
Status: RESOLVED WONTFIX
Product: platform
Classification: Unclassified
Component: JDK Problems
7.3
All All
: P3 (vote)
: TBD
Assigned To: Antonin Nebuzelsky
issues@platform
EXCEPTIONS_REPORT perf-profileme cndr...
: PERFORMANCE
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-24 10:41 UTC by Vladimir Voskresensky
Modified: 2013-12-27 15:00 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
nps snapshot (20.25 KB, application/nps)
2013-01-24 10:41 UTC, Vladimir Voskresensky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Voskresensky 2013-01-24 10:41:19 UTC
This issue was reported manually by vv159170.
It already has 4 duplicates 


Build: NetBeans IDE Dev (Build 20130124-94e02e22bb69)
VM: Java HotSpot(TM) Server VM, 23.6-b04, Java(TM) SE Runtime Environment, 1.7.0_10-b18
OS: SunOS

User Comments:
rptmaestro: Right-clicked in favorites to open file chooser for adding a folder.

vv159170: add foler to favorites



Maximum slowness yet reported was 7770 ms, average is 5337
Comment 1 Vladimir Voskresensky 2013-01-24 10:41:21 UTC
Created attachment 130570 [details]
nps snapshot
Comment 2 Ondrej Vrabec 2013-01-24 10:45:56 UTC
slowness in a standard Java JFileChooser:
> javax.swing.AbstractButton.doClick(): 7630 / 0
> javax.swing.DefaultButtonModel.setPressed(): 7630 / 0
> javax.swing.DefaultButtonModel.fireActionPerformed(): 7630 / 0
> javax.swing.AbstractButton$Handler.actionPerformed(): 7630 / 0
> javax.swing.AbstractButton.fireActionPerformed(): 7630 / 0
> javax.swing.plaf.basic.BasicFileChooserUI$ApproveSelectionAction.actionPerformed(): 7630 / 0
> java.io.File.exists(): 2850 / 0
Comment 3 Vladimir Voskresensky 2013-01-24 12:05:44 UTC
Ondra, let's leave it open and discuss it while I'm in Prague. It's the problem our customers face in Studio IDE product. We should find a solution
Comment 4 Ondrej Vrabec 2013-01-24 12:54:47 UTC
sure, there is a solution, JDK team could probably fix it and optimize the default implementation.
Comment 5 Ondrej Vrabec 2013-01-24 15:00:20 UTC
What do you use in cnd code for file browsing and selecting to avoid BasicFileChooserUI.ApproveSelectionAction.actionPerformed and multiple calls to file.exists, file.isDirectory and others there? Maybe i can reuse the same implementation.
Comment 6 Vladimir Voskresensky 2013-01-25 13:08:56 UTC
Ondrej. Not sure we have solved all the issues on cnd side, but our file chooser impl for remote file system can be found in package
org.netbeans.modules.remote.api.ui in dlight.remote module
FileChooserBuilder & RemoteFileSystemView does some tricks to have "Loading" instead of UI freezes when i.e. dbl-click to jump into nested folder from current files list
Comment 7 Ondrej Vrabec 2013-02-01 10:31:07 UTC
problem of all standard file choosers throughout the IDE, should be solved not only in Favorites but a general solution should be found.
Comment 8 Petr Cyhelsky 2013-02-04 12:07:57 UTC
there are five invocations of java.io.UnixFileSystem.getBooleanAttributes() which take 1,919 ms, 1,419 ms, 2850 ms, 720 ms and 719 ms respectively. It seems that the filesystem has to be really slow for basic operation to take that long. Nonetheless if something can be done about this it should probably be done by jdk team. Reassigning to platform/jdk to evaluate, whether this is important enough to report to jdk...
Comment 9 Antonin Nebuzelsky 2013-12-27 15:00:52 UTC
There are very old issues filed against JFileChooser about this. E.g.
https://bugs.openjdk.java.net/browse/JDK-4401639
 which is a dup of a still open:
https://bugs.openjdk.java.net/browse/JDK-4260746

Vladimir, add notes about your setup specifics directly to the JDK issue, raising its priority eventually. Thanks.


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo