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 225678

Summary: Paralelize Maven local repo indexing
Product: projects Reporter: pekarna <pekarna>
Component: MavenAssignee: Tomas Stupka <tstupka>
Status: RESOLVED WONTFIX    
Severity: normal CC: terje7601
Priority: P3    
Version: 7.3   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:

Description pekarna 2013-02-04 00:19:20 UTC
Indexing local repo takes considerable amount of time.
For classical disks, the limiting factor is I/O speed.
But for SSD disks, it's processor. There's almost no I/O wait and one processor is at 90 %.

Making the indexing paralelized on more CPU cores could make indexing dramatically faster.
Comment 1 Milos Kleint 2013-02-13 15:03:03 UTC
one reason why it takes so long is that the local repository index contains more entries than  the indexes downloaded from official places. Among other things we construct the MavenProject model of the artifact to be able to populate the dependencies field. That one is used in the "Find usages" action in Services/Maven Repositories artifact nodes. (and maybe other places)
I'm not convinced the feature is used widely enough to justify the slowdown. It might be worth measuring what is the speed improvement with the feature in index turned off.
Comment 2 Milos Kleint 2013-09-03 09:14:01 UTC
for my local repository count of 7114 artifacts, the time spent in
ClassDependencyIndexCreator is 32% and ArtifactDependencyIndexCreator is 17%, so in total arount 50% time spent indexing the local repository.
The time spent is measured in creating documents in lucene index (excluded scanning the directories in the beginning)

ClassDependencyIndexCreator opens the artifact and creates a list of classes in the jar.
ArtifactDependencyIndexCreator loads a MavenProject model for the artifact in question.
Comment 3 Milos Kleint 2014-01-17 10:05:53 UTC
please see issue 239915, we've disabled osgi related processor that could in some cases account for almost 50% of the size of the entire index (apparently bundle-import/export entries are fairly long).

That processor was in effect for both local and remote repository indexes.
Comment 4 Martin Balin 2016-07-07 08:38:57 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss