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
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]
Created attachment 78787 [details]
*** 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.
Manual measurement, find usages on jEdit class:
6.7 w/o fix
6.7 w/ fix