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 198047 - Open Maven project takes one CPU and "Scanning projects... " never terminates
Summary: Open Maven project takes one CPU and "Scanning projects... " never terminates
Status: VERIFIED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.0
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Assignee: Jesse Glick
URL:
Keywords: PERFORMANCE
Depends on:
Blocks:
 
Reported: 2011-04-24 20:16 UTC by jstiepel
Modified: 2011-05-05 22:30 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
using 77% of the CPU (69.71 KB, image/png)
2011-04-24 20:16 UTC, jstiepel
Details
getOwner 22% of the CPU (68.58 KB, image/png)
2011-04-24 20:17 UTC, jstiepel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jstiepel 2011-04-24 20:16:42 UTC
Created attachment 107926 [details]
using 77% of the CPU

I have a huge Multi-Projects Maven project.

Scanning projects... is stopping with at one project und only consumes one CPU with 100%. 

The profiler shows that 

org.netbeans.modules.maven.embedder.MavenEmbedder.getSettings() uses 68% of the time

and 
org.netbeans.modules.projectapi.SimpleFileOwnerQueryImplementation.getOwner()uses 22%.
Comment 1 jstiepel 2011-04-24 20:17:18 UTC
Created attachment 107927 [details]
getOwner 22% of the CPU
Comment 2 Jesse Glick 2011-04-27 14:33:45 UTC
Do you have the original *.nps file? That would be more useful to attach than screenshots.

Excessive calls to getSettings can probably be fixed. Other problems may remain. I do not know how big "huge" is, but you are probably better off opening only a few modules of interest (uncheck "Open Required Projects"!) unless you really mean to e.g. do a system-wide rename refactoring among SNAPSHOT dependencies.

If the sources are publicly available, let me know as they might be a useful test case.
Comment 3 Jesse Glick 2011-04-27 14:59:06 UTC
core-main #f7a0fbb66aec may help.
Comment 4 Quality Engineering 2011-04-28 05:07:20 UTC
Integrated into 'main-golden', will be available in build *201104280000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/f7a0fbb66aec
User: Jesse Glick <jglick@netbeans.org>
Log: #198047: cache result of loading settings.xml (unless it changes) to save time opening/parsing projects.
Comment 5 jstiepel 2011-05-03 10:24:51 UTC
Ok hughe for me. 
around 30 Maven modules with 11000 .java Files.
Comment 6 Jesse Glick 2011-05-04 13:17:14 UTC
Received the *.nps privately. Based on that, I believe f7a0fbb66aec should reduce overhead considerably. I added another smaller optimization in core-main #603117af867f.
Comment 7 Quality Engineering 2011-05-05 06:04:55 UTC
Integrated into 'main-golden', will be available in build *201105050000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/603117af867f
User: Jesse Glick <jglick@netbeans.org>
Log: #198047 cont'd: skip straight to MavenFileOwnerQueryImpl for artifact ownership; SimpleFileOwnerQueryImplementation would not generally produce results anyway.
Comment 8 jstiepel 2011-05-05 22:29:09 UTC
this bug is fixed. checked with the nightly build.
Comment 9 Jesse Glick 2011-05-05 22:30:02 UTC
Excellent, thanks for following up.