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.
There are many MDR events fired on project opening where event.getOldElement() and event.getNewElement() are equal. It had huge performance effect on annotation listeners in 5.5 release. I will ask Tomas to add more details to this issue.
Tomasi, can you please describe what exactly is the problem?
In some cases JavaClassImpl.internalSetName(String name) is called with the FQN name, which is same as the name of the JavaClass itself. Setting the name to itself does nothing except if fires MDR event change. Eliminating this events can improve performance of whole Java Model infrastructure. Note that j2ee modules already eliminates this events by checking old and new values of event. Adding this check significantly improved opening of j2ee projects.
Created attachment 34168 [details] proposed fix
Fixed in trunk. Checking in JavaClassImpl.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/JavaClassImpl.java,v <-- JavaClassImpl.java new revision: 1.73; previous revision: 1.72 done
Fix improved after review from Dan P. Checking in JavaClassImpl.java; /cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/JavaClassImpl.java,v <-- JavaClassImpl.java new revision: 1.74; previous revision: 1.73 done
proposed fix is correct and safe, merged into release55_dev /cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/JavaClassImpl.java,v <-- JavaClassImpl.java new revision: 1.62.2.4.2.2.14.1; previous revision: 1.62.2.4.2.2
Created attachment 34239 [details] patch for release55
Perhaps this was the cause of issue #84806: MainClassUpdater in j2seproject was being told that the main class had been renamed when it had not.
verified in release55_dev, can be merged to NB 5.5
Fixed merged into release55. /cvs/java/javacore/src/org/netbeans/modules/javacore/jmiimpl/javamodel/JavaClassImpl.java new revision: 1.62.2.4.2.3; previous revision: 1.62.2.4.2.2
Yes, this issue can cause the issue #84806.
verified in 5.5
Reorganization of java component