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 157545 [details] endless-refactor-prepare.npss I'm doing refactoring in my Java code and renaming of one of the methods takes unacceptably long time. After I click 'Refactor' button in the 'Rename' dialog, it starts showing progress bar and at stage 'Prepare' it reaches 10% in around 1 minute. I actually could not wait until the end because it seems it goes further event slower. Self profiler is attached.
Missed to add more details - method belongs to the class in the root of the hierarchy of around 20 other classes. It is named like - static void MyRootClass.initContext(context) subclasses also define static method with same name and all of them invoke initializers from super classes - i.e. MyRootClass.initContext() is invoked in around 10 other places. Not sure if this code layout is relevant to the problem. PS: project is a Gradle project.
"Find Usages" on this method also runs pretty long, but acceptably long - around 10 secs or less.
Damn, it seems I've found the root problem - during refactoring "import static" of that method was duplicated 7000 times in one child file, 2000 times in another file and so on. I have not idea why and when this is happening.