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 120285 - [60cat] Switching Project groups responsiveness breaking UI guidelines
Summary: [60cat] Switching Project groups responsiveness breaking UI guidelines
Status: RESOLVED WORKSFORME
Alias: None
Product: apisupport
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P2 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2007-10-28 11:55 UTC by _ theanuradha
Modified: 2007-11-03 20:17 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
thread dump (22.98 KB, application/octet-stream)
2007-10-29 11:44 UTC, _ theanuradha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ theanuradha 2007-10-28 11:55:13 UTC
[60cat] Switching Project groups responsiveness breaking UI guidelines 

Steps :

1.Open Netbeans nbbuild ['NetBeans Build System'] project and also open some netbeans projects like
'projectui','nodes'..(two projects may be enough)

2.Create project group as 'NetBeans Build System' and switch to project group 'none'

3.Create Java SE Project and create project group call 'group 1'

4.Close netbeans and restart

5.Open Netbeans try to switch to 'NetBeans Build System' it will take 45 sec to show up Project list in 'Projects View'

Config:
Product Version: NetBeans IDE Dev (Build 071027)
Java: 1.6.0_05-ea; Java HotSpot(TM) Client VM 1.6.0_05-ea-b04
System: Windows XP version 5.1 running on x86; Cp1252; en_US (nb)

And T2300 at 1.66Ghz
and 2GB ram
Comment 1 _ theanuradha 2007-10-28 11:58:18 UTC
Note : I also notice that when switching between groups closing group class paths and dependency scanning take place 
is it required ?
Comment 2 Jesse Glick 2007-10-28 17:40:29 UTC
I do not observe any such problem:

1. Run 071026, fresh user dir, JDK 6, Ubuntu, Tecra M5 w/ 2 GB. Close Start Page.

2. Open nbbuild, projects/projectui, and openide/nodes projects from up-to-date built NB source tree. (Note: use an
*up-to-date and built* source tree with a *current* version of NB as there is a very recent optimization for loading
module projects from netbeans.org.)

3. File > Project Group > New Group, name NB.

4. File > Project Group > (none)

5. File > New Project > Java Application.

6. File > Project Group > New Group, name Demo.

7. Wait for CP scanning to finish, if necessary. (In my case it wasn't.)

8. File > Project Group > NB. Opens in < 2 sec, CP scanning done in < 4 sec.

9. File > Project Group > Demo. Done in < 1 sec.

10. Switching back and forth, especially with no sources open, done in < 1 sec in each case including CP rescan.

If you can continue to reproduce, you need to get thread dumps at a minimum (use jstack), or preferably run a profiler
and record hotspots. Any absurd delays (on the order of a minute) are almost certainly not specific to switching project
groups as such; much more likely related to either the NB module project loading code (especially for nb.org module
projects, which are handled differently from external modules), or Java CP scanning.

And yes it is necessary to trigger CP scans when switching project groups, just as it would be necessary when opening or
closing projects by hand. Changing a project group is just a shortcut for closing some projects and opening others.
Comment 3 _ theanuradha 2007-10-29 06:35:41 UTC
Sorry I miss one thing in step 4(Close netbeans and restart)
it should be reboot not restart 

Real problem is I got around 10 Project groups in my company have 2 Module suite projects(one suite have around 10 to 15
modules),Netbeans source , and have different library projects and have complex dependency's. every time I reboot I have
to wait around 45 sec to 1min time when switching between projects (first time).It is really pain full so I'm increasing
priority P1 if I'm wrong please feel free to reduce priority 

I'll try attached thread dumps soon :)        

Comment 4 _ theanuradha 2007-10-29 06:36:19 UTC
Sorry I miss one thing in step 4(Close netbeans and restart)
it should be reboot not restart 

Real problem is I got around 10 Project groups in my company have 2 Module suite projects(one suite have around 10 to 15
modules),Netbeans source , and have different library projects and have complex dependency's. every time I reboot I have
to wait around 45 sec to 1min time when switching between projects (first time).It is really pain full so I'm increasing
priority P1 if I'm wrong please feel free to reduce priority 

I'll try attached thread dumps soon :)        

Comment 5 _ theanuradha 2007-10-29 06:39:07 UTC
I do have up-to-date built NB source tree (Build 071029)
Comment 6 _ theanuradha 2007-10-29 11:44:18 UTC
Created attachment 51882 [details]
thread dump
Comment 7 Jesse Glick 2007-10-29 18:17:22 UTC
In no case a P1. That is reserved for the IDE not working or other developers not being able to test their own work.
Debatable whether a P2 or P3 - depends on how many people are affected. After a reboot, you have cold disk caches, so it
takes a while to load various projects, especially nb.org modules. To some extent you just have to wait while your disk
caches are warmed up, and that just depends on how slow your disk is (CPU is only marginally relevant).

You are getting the slow-mode load of nb.org sources which is far slower (and more disk-intensive) than the mode used
when your cache is up to date, as after a full build of sources. Are you positive it is built? Does
nbbuild/nbproject/private/scan-cache-full.ser exist? Does 'ant -f nbbuild/build.xml init' say it is recreating this file?

To determine why the cache is not being used to scan your nb.org sources, run with

-J-Dorg.netbeans.modules.apisupport.project.universe.ModuleList.level=0

and look in the log file for an exception following "Failed to load cached module list...".
Comment 8 Jesse Glick 2007-11-03 20:17:25 UTC
No further information.