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.
It seems to be necessary to implement caching of results in SourceFileManager. In case of JavaSource over multiple files SourceFileManager.list significantly slows down JavacParser.moveToPhase. See the attached profiler snapshot and especially MoveTransformer.setWoringCopy->...->WorkingCopy.toPhase->...->JavacParser.moveToPhase->ErrorHandlingJavadocEnter.main->ProxyFileManager.list As a test case I have used the refactoring rename action on org.gjt.sp.jedit package of the jEdit project. It runs JavaSource.runModificationTask over ~280 java files. Product Version: NetBeans IDE Dev (Build 090324) Java: 1.6.0_10; Java HotSpot(TM) Client VM 11.0-b15 System: Linux version 2.6.27-11-generic running on i386; UTF-8; en_US (nb)
Created attachment 78786 [details] snapshot preview
Created attachment 78787 [details] snapshot
thanks!
*** Issue 161913 has been marked as a duplicate of this issue. ***
The problem seems to be in using wrong JavaFileManager, i will take care of it.
Any news here? Feel free to re-assign to (?) ... Thanks.
I didn't get to such a big numbers. Only called for sources.
The results caching is not necessary IMHO, since javac calls list(...) only once per package. The problem here is that for each visited java file the new instance of javac compiler is created.
Fixed in jet-main. http://hg.netbeans.org/jet-main/rev/9da7e6b0df5a
Manual measurement, find usages on jEdit class: 6.5.1 ---- 6,1s 5,3s 5,2s 6.7 w/o fix --------- 15,1s 15,3s 15,2s 6.7 w/ fix -------- 6,0s 6,0s 6,0s