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 119670 - [60cat] Opening packages under Project very slow
Summary: [60cat] Opening packages under Project very slow
Status: RESOLVED DUPLICATE of bug 117179
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Milan Kubec
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2007-10-22 16:54 UTC by darrinps
Modified: 2007-10-30 14:31 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Thread dump for package opening (34.40 KB, text/plain)
2007-10-23 14:33 UTC, darrinps
Details
Thread dump for package opening test 2. (24.89 KB, text/plain)
2007-10-25 17:37 UTC, darrinps
Details
A longer thread dump (133.25 KB, text/plain)
2007-10-29 14:38 UTC, darrinps
Details

Note You need to log in before you can comment on or make changes to this bug.
Description darrinps 2007-10-22 16:54:25 UTC
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.
Comment 1 Milos Kleint 2007-10-23 08:18:55 UTC
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.
Comment 2 Jan Lahoda 2007-10-23 08:27:49 UTC
Milan is the owner of PackgeViewChildren, AFAIK.
Comment 3 darrinps 2007-10-23 14:30:12 UTC
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.
Comment 4 darrinps 2007-10-23 14:33:56 UTC
Created attachment 51496 [details]
Thread dump for package opening
Comment 5 darrinps 2007-10-23 14:37:29 UTC
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.  
Comment 6 darrinps 2007-10-24 15:19:53 UTC
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.


Comment 7 Milan Kubec 2007-10-25 08:05:31 UTC
Yes, please provide more thread dumps. The attached one doesn't show much. Thanks.
Comment 8 Milan Kubec 2007-10-25 11:00:59 UTC
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.
Comment 9 Petr Nejedly 2007-10-25 12:24:31 UTC
Note: when deleting files through NetBeans, file recognition is performed as well (individual file types may intercept
their deletion).
Comment 10 Milan Kubec 2007-10-25 12:44:30 UTC
Please try to run the same usecase with project that is not under Clearcase version control. Thanks.
Comment 11 darrinps 2007-10-25 17:38:00 UTC
Created attachment 51710 [details]
Thread dump for package opening test 2.
Comment 12 darrinps 2007-10-25 17:45:12 UTC
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)
Comment 13 darrinps 2007-10-25 21:09:42 UTC
As a test, I went to the files in Windows and expanded several packages.  It was nearly instantaneous each time.  
Comment 14 Milan Kubec 2007-10-29 09:41:25 UTC
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.
Comment 15 darrinps 2007-10-29 14:38:39 UTC
Created attachment 51898 [details]
A longer thread dump
Comment 16 darrinps 2007-10-29 14:46:15 UTC
As requested, a thread dump with five or so snapshots taken during the period in question.
Comment 17 Jiri Kovalsky 2007-10-29 16:12:26 UTC
This issue was reported by NetCAT 6.0 participant.
Comment 18 Milan Kubec 2007-10-30 14:31:20 UTC
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 ***