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 88092 - IDE Startup is very slow is large project is opened at startup
Summary: IDE Startup is very slow is large project is opened at startup
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Code Model (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Vladimir Kvashin
URL:
Keywords:
: 88143 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-10-26 17:12 UTC by Vladimir Kvashin
Modified: 2008-01-31 19:27 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Kvashin 2006-10-26 17:12:19 UTC
Consider the situation when Netbeans/CND opend project at startup (just because
it was opened last time user exited IDE). If the project is large (2000+ files),
the startup is slowed down dramatically. Some messages in console shows that
code model is parsing files. On my laptop startup took more than a minute in
this case.
Comment 1 Vladimir Kvashin 2006-10-26 17:35:46 UTC
Experiments shows that this occurs when ClassView is open. When ClassView is
closed, startup time is at least 10 times less.
Comment 2 Vladimir Kvashin 2006-10-27 17:51:51 UTC
The reason of the problem is that ClassView calls CsmProject.isStable() in AWT
thread; CsmProject.isStable() in turn called synchronized implementation of
ProjectImpl.hasChangedFiles().

The solution is: 
1) process even inital class view nodes in a separate thread
2) make hasChangedFiles() not synchronize method; use a separate object for
synchronization instead (now both hasChangedFiles() and ensureFilesCreated() are
synchronized and the latter takes a lot of time on large projects)
Comment 3 Vladimir Kvashin 2006-10-27 17:55:37 UTC
Fixed:

Checking in ClassView.java;
/shared/data/ccvs/repository/cnd/classview/src/org/netbeans/modules/cnd/classview/ClassView.java,v
 <--  ClassView.java
new revision: 1.2.2.7; previous revision: 1.2.2.6
done

Checking in ProjectBase.java;
/shared/data/ccvs/repository/cnd/modelimpl/src/org/netbeans/modules/cnd/modelimpl/csm/core/ProjectBase.java,v
 <--  ProjectBase.java
new revision: 1.2.2.21; previous revision: 1.2.2.20
done

Checking in ProjectImpl.java;
/shared/data/ccvs/repository/cnd/modelimpl/src/org/netbeans/modules/cnd/modelimpl/csm/core/ProjectImpl.java,v
 <--  ProjectImpl.java
new revision: 1.2.2.11; previous revision: 1.2.2.10
done
Comment 4 Vladimir Kvashin 2006-10-28 11:12:13 UTC
*** Issue 88143 has been marked as a duplicate of this issue. ***
Comment 5 dnikitin 2008-01-31 19:27:35 UTC
Verified