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 161455 - Non scalable project opening
Summary: Non scalable project opening
Status: RESOLVED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: Project (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Thomas Preisler
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2009-03-30 11:47 UTC by rmartins
Modified: 2009-05-21 18:42 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 rmartins 2009-03-30 11:47:54 UTC
I am trying to index a rather large project, the ACE+TAO middleware
(http://download.dre.vanderbilt.edu/previous_versions/ACE+TAO-5.6.8.tar.bz2).
Here are the steps that I took:
1. mkdir build (in ACE_TAO main directory)
2. cd build
3. ../configure --enable-ace-reactor-notification-queue

After creating a project in Netbeans (creating using existing source files), it takes a very long time to open the project.
Comment 1 rmartins 2009-04-06 17:45:47 UTC
Hi Thomas,
Do you need thread dumps or additional info on this issue?

Rolando
Comment 2 Thomas Preisler 2009-04-06 18:20:41 UTC
no, I don't think so. I will ask for one if I need it, but thanks.
Comment 3 rmartins 2009-04-17 11:43:42 UTC
Hi Thomas,
I forgot to mention that the opening process completely blocks the IDE, it seems it's running on the EDT...

Thanks,
Rolando
Comment 4 Quality Engineering 2009-05-04 19:06:25 UTC
Integrated into 'main-golden', will be available in build *200905041401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/600ec1cc33ef
User: Thomas Preisler <thp@netbeans.org>
Log: #161455 Non scalable project opening
Comment 5 Thomas Preisler 2009-05-05 03:07:42 UTC
Stats of the ACE project:

50.000 files
   5.000 C++ source files (.cpp)
   5.000 Header files (.h)
  40.000 Other files
25.000 generated files
------
75.000 files total

Current project performance:
  Project creation: 5:00 minutes
  Parsing: > 1 Hour
  Project Reopen:
    Read project (configuration.xml): 3:00 min
    Attach Listeners:                 0:20 min
    Record Metrix:                    0:40 min
  configuraton.xml: 70.000 lines/3.1 MB

The root cause of the poor performance are all the non-language files that are added to the project. There is a heavy machinery like assigned tool, attached listeners, etc. associated with each file and it adds up when we talk about 
75.000 files. Only 10.000 of the total of 75.000 files are relevant to project manipulation and the code model.

Proposed solution:
1) Apply a 'language' filter when disk folders are searched for files so only true language files (C/C++/...) are added to project (right now all or almost all files are added). Filter is based on language extensions and can be 
manipulated by user via the usual extension option panel. Then only true language files are handled in internal data structures inside project: Item, NativeItem, NativeProject, ItemConfiguration, ...
2) Enhance MakeLogicalViewProvider to dynamically display all files in a disk folder. More precisely, it will dynamically add the non-language files to the folder view when you open a folder (but they will not be added to project).
3) Add custom folder filter to projects


1) will ensure the project is small and only relevant files are in the project and handles by internal data structures.
2) will ensure the view is still the true physically disk view. No difference from before. Note: non-language files are only added when you actually open a folder in Project View and it handles only files in that particular folder, so it 
is very quick and there is virtually no overhead.
3) adds ability to customize the project view by applying filter to folder names. It can also dramatically reduce number of files the project have to deal with.

After implementing 1) - 3) I can now open the project in about 25 seconds. Parsing still takes a long time but this is a separate issue. Will consider this IZ fixed although a few pending issues are still being worked on. None of 
them will have performance impact though.
Comment 6 Quality Engineering 2009-05-05 18:59:38 UTC
Integrated into 'main-golden', will be available in build *200905051401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/a51fd290eb5e
User: Thomas Preisler <thp@netbeans.org>
Log: #161455 Non scalable project opening
Comment 7 Quality Engineering 2009-05-07 07:47:54 UTC
Integrated into 'main-golden', will be available in build *200905070201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/8c8665da63ab
User: Thomas Preisler <thp@netbeans.org>
Log: #161455 Non scalable project opening
Comment 8 Quality Engineering 2009-05-07 19:18:15 UTC
Integrated into 'main-golden', will be available in build *200905071401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/630212642fc6
User: Thomas Preisler <thp@netbeans.org>
Log: #161455 Non scalable project opening
Comment 9 Alexander Simon 2009-05-13 12:34:19 UTC
Please, restore ignore file filter: ".*\\.(o|lo|la|Po|Plo)$"
Because a lot of project creates mentioned files in the source folder.
It results in a lot of trash in project tree.
For example you can take pkg-config project.
Use ignore file filter in MakeLogicalViewProvider as additional with default.

Comment 10 Alexander Simon 2009-05-13 14:12:30 UTC
Another bug:
File filter for extension "c++" does not work because "+" is meta symbol.
Comment 11 Vladimir Voskresensky 2009-05-14 16:54:01 UTC
One more bug:
- if remove all text from filter text area => physical folder is not created
Comment 12 Alexander Simon 2009-05-18 13:17:29 UTC
Change set http://hg.netbeans.org/cnd-main/rev/75348f5078de
- fix empty ignore pattern
- check user input in ignore pattern
Change set http://hg.netbeans.org/cnd-main/rev/e59b6375f26e
- fix c++ pattern
Comment 13 Alexander Simon 2009-05-18 13:57:31 UTC
change set http://hg.netbeans.org/cnd-main/rev/32b1632505ea
- do not show files with pattern ".*\\.(o|lo|la|Po|Plo)$" in project tree
Thomas, please, review my changes. If you agree close issue.
Comment 14 Thomas Preisler 2009-05-18 21:16:42 UTC
All issues w.r.t. performance have been fixed so I will consider this IZ fixed and I will close it. Whether we should display binary files in view or not is a 
different issue and being discussed separately.
Comment 15 Quality Engineering 2009-05-19 07:23:13 UTC
Integrated into 'main-golden', will be available in build *200905190201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/e59b6375f26e
User: Alexander Simon <alexvsimon@netbeans.org>
Log: fixing IZ#161455:Non scalable project opening
- fix c++ pattern
Comment 16 Quality Engineering 2009-05-21 18:42:54 UTC
Integrated into 'main-golden', will be available in build *200905211401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/ebdbaa9d410d
User: Thomas Preisler <thp@netbeans.org>
Log: #161455 Non scalable project opening