Most of the CosIndexer time is spent in the BinaryForSourceQuery.DefaultResult.getRoots() which needs to do quite expensive calculation (queries lots of ClassPath.getCP, SFBQ.fs).
Implementing BinaryForSourceQueryImpl reduces the time spent in CosIndexer by 90%.
Fixed jet-main 263679ed6809
Integrated into 'main-golden', will be available in build *201202250400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Tomas Zezula <email@example.com>
Log: #208815:Missing BinaryForSourceQueryImpl slows down CosIndexer
Thanks, looks good.
BTW prefer unit tests to deal with external modules created in getWorkDir using NbModuleProjectGenerator, not netbeans.org modules, since BinaryForSourceImplTest as written would probably have to be added to test.config.stableBTD.excludes.
OK, I will fix the test to use the NbModuleProjectGenerator.