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.
Created attachment 116077 [details] Snapshot Most of the CosSynchronizerIndexer time is spent in the BinaryForSourceQuery.DefaultResult.getRoots() which needs to do quite expensive calculation (queries lots of ClassPath.getClassPath, SFBQ.findSources). The overall time spent in the CosSynchronizerIndexer is quite significant. For glassfish project the complete up to date check is 250s from which CosSynchronizerIndexer takes 143s. Similar problem was in NbModuleProject where adding of BinaryForSourceQueryImpl improved the performance by 90%.
we already have a project based BFSQ that covers the project's artifact in the local repository. This new additional BFSQ implementation would map a binary artifact to all source jars in repository, unless covered by the project one already. Is that correct?
The measurements were done on NB 7.1. When the maven BFSQ was added? If it was added in dev it may be already fixed. Should I remeasure it on dev?
AFAIK it's there for multiple releases..
In this case it does not seem to be enough. I will run the IDE with debug messages to find out for which roots the default BFSQ.Result is used.
No need, logging shows that src/{main,test}/resources/ is not mapped.
core-main #ee4e39fada10
Great! The CosSynchronizerIndexer time has decreased from 165s to 2s for glassfish project. Thanks
Integrated into 'main-golden', will be available in build *201202280400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/ee4e39fada10 User: Jesse Glick <jglick@netbeans.org> Log: #208816: Missing BinaryForSourceQueryImpl slows down CosSynchronizerIndexer
Hmm, if the improvement is really that dramatic it may merit a backport.
Agree with integration into Patch 2
releases #d4b88ea77726 (adjusted for branch), releases #52755cf5faea (test prerequisite), releases #bd1f7ddcbc06 (update)
Integrated into 'releases', will be available in build *201203222205* or newer. Wait for official and publicly available build. Changeset: http://hg.netbeans.org/releases/rev/d4b88ea77726 User: Jesse Glick <jglick@netbeans.org> Log: #208816: Missing BinaryForSourceQueryImpl slows down CosSynchronizerIndexer
could you please give me insight on some steps to be able to verify this in 7.1.2? Thanks in advance.
I guess the simplest way is to run with -J-Dorg.netbeans.api.java.queries.BinaryForSourceQuery.level=FINE and check that findBinaryRoots(...) -> nil is no longer printed when opening Maven projects.
Open glassfish maven project in NB 7.1 and nb 7.1.2, create a nps and look on time spent in BinaryForSourceQuery.
Ok i tried to use the parameter and no findBinaryRoots(...) -> nil was shown when opening project with nonzero number of binary roots -> verified