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.
I have noticed that for large projects expanding a package under the Projects tab for java\src is very slow the first time you do it. For example, I expanded a a package that contained about thirty files and it took over 10 seconds to show up. Doing the same thing in Eclipse was instantaneous. Note that the files are located on the network and are under source control (Clearcase)...but they are for Eclipse too. After the initial load, collapsing and subsequent expanding works as quickly as Eclipse does.
is this happening continuously to you? I don't experience this slowness even on bigger codebase (hundreds of files in many packages) The expanding of package view is dependent on IO so other programs or background tasks in netbeans can interfere, reassigning to java, where package view is implemented.
Milan is the owner of PackgeViewChildren, AFAIK.
This happens continuously on projects stored on the network in Clearcase but not on small projects where the files are stored locally and not under Clearcase control. It might just be a difference in perception where you are used to seeing delays. I use Eclipse most of the time and there are no delays (less than a second) to open the very same packages that takes Netbeans 5 to 10 seconds to open. What I do is test Netbeans then go over to Eclipse and do the same thing only to find that Eclipse does it much quicker. I then reverse the process (opening up a package on Eclipse first then Netbeans) and the same thing happens (Netbeans takes 5-10 seconds to open). Again, this is a one time thing though. Once Netbeans has opened the package it is fast at collapsing and reopening it. I'll attach a thread dump so you can see better what is going on.
Created attachment 51496 [details] Thread dump for package opening
Note that when I try to open a package, I get a message at the lower right of Netbeans that says "Finding Packages in ..." My guess is that Eclipse may be running a background thread that loads up the files when it first starts instead of waiting on the user to select the packages.
Another caveat. I just deleted a .contrib (on the network but not under Clearcase control) file and doing that took about 10 seconds as well, so it isn't just expanding packages. I then went over to Eclipse, found a .contrib file, and deleted that. It took less than one second to do so. I then did a refresh of all of the files in Eclipse (again, same project as the one I'm using in Netbeans) and that only took 12 seconds...about what it takes just to expand one package in Netbeans. So, Netbeans is doing something that is taking a long time. Let me know if more thread dumps will help.
Yes, please provide more thread dumps. The attached one doesn't show much. Thanks.
Please provide more info about IDE version, recently there were some fixes that might speed up file loading. Beta 2 already contains those fixes. Do you have installed some additional packs to IDE? What platform and what JDK do you use? What type of network filesystem do you use? Thanks.
Note: when deleting files through NetBeans, file recognition is performed as well (individual file types may intercept their deletion).
Please try to run the same usecase with project that is not under Clearcase version control. Thanks.
Created attachment 51710 [details] Thread dump for package opening test 2.
I just created another attachment for the use case where the files are under source control. I then did a couple more comparisons between Netbeans and Eclipse where I closed them both down and opened them both back up. In one instance Netbeans took 11 seconds and in another it took 19. In both cases using Eclipse the response was instantaneous. I then ran a local test where I copied all of the files to my local machine. In each case, the response from Netbeans was no more than a second or two even for large packages. So, it does have something to do with Clearcase and/or the network, but my question is still, why can Eclipse do it so fast? There must be something that they are doing differently. BTW, here is my configuration: Product Version: NetBeans IDE 6.0 Beta 2 (Build 200710212201) Java: 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05 System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)
As a test, I went to the files in Windows and expanded several packages. It was nearly instantaneous each time.
Thanks for details. Please could you generate couple of thread dumps in a row (at least 5) during the time, let's say one each second and attach the log. Thanks.
Created attachment 51898 [details] A longer thread dump
As requested, a thread dump with five or so snapshots taken during the period in question.
This issue was reported by NetCAT 6.0 participant.
From thread dumps I assume it's the same problem as issue #117179. The problem arises when either there is lot of classes in package or the package is on network drive. *** This issue has been marked as a duplicate of 117179 ***