Navigating the file system with netbeans is VERY slow

Viewed 834

Since a few days, navigating the file system with Netbeans is VERY slow (more than two minutes to access a file, and if you have to navigate a file system, it is true every time. I have exactly the same problem after clearing the cache, and with Netbeans 8.2 and Netbeans 12 (Netbeans 8 with Java 8, and Netbeans 12 with Java 17 in my tests).

Strangely I don't have the same problem with regular Java file choosers which I use in my projects. For example, if I click on "Open Project", the IDE is frozen for sometimes 2 or 3 minutes before I can see the file navigator.

When I am looking in the task manager while trying to open a project for example, it appear that Network usage is very low (1% to 0%), CPU also very low (less than 2%)

I am talking about Netbeans itself, for example if I want to open an existing project, or adding a jar file to the list of Jar libraries for an existing project

The standard Swing JFileChooser works correctly. With this example code the navigation is immediate (as expected):

JFileChooser chooser = new JFileChooser();            
chooser.setDialogType(JFileChooser.OPEN_DIALOG);         
chooser.setDialogTitle("Test FileChooser");  
chooser.setFileSelectionMode(JFileChooser.FILES_ONLY);         
int ret = chooser.showOpenDialog(null);         
if (ret == JFileChooser.APPROVE_OPTION{ 
   System.out.println(chooser.getSelectedFile().getAbsolutePath());        
}

I am on Windows, on my workplace network (I am working on local files on my PC, but there are two remote drives which are accessible on the network). I only have problems with Netbeans, other apps have no problem with the file system.

My problem is with Netbeans itself navigating the file system (for example opening an existing project, or adding a jar file as a library for a project)

This looks to behave exactly as this bug: https://bz.apache.org/netbeans/show_bug.cgi?id=42079, except that it does not happen with the Swing JFileChooser as shown above.

Is it a known problem, and if it is, is there a mean to fix it? I was thinking for example about a setting on the command line used to start Netbeans.

4 Answers

There is a bug in netbeans with links from the desktop, that behaves like you described. Try to remove all links from the desktop and default location for the open file dialog.

issues.apache.org/jira/browse/NETBEANS-1537

It was a BROKEN PATH in a link on the desktop in Windows 10, in my case.

NetBeans 12.5 -> Creating a new project dialog, than "Browse" to choose appropriate directory took a very long time. I tried to test links on my desktop. I found one old "broken link". Broken in terms - it pointed out to non existent path. I corrected this path in this link and... voilĂ , magically NetBeans is working correctly.

I had the same problem. As they wrote here, it is necessary to check the links on the desktop. Removing bad links helped me.

I find that this happens when I run Netbeans without administrator rights. With admin rights it works fine.

Related