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.
Two new abstract methods is necessary to be added to xml.xam/src/org/netbeans/modules/xml/xam/AbstractComponent.java for the sake of performance enhancement public void checkChildrenPopulated(); public void getChildrenCount(); Method getChildren() makes copy of children's list and it can be time consuming in case of big amount of children. The method is called very frequently in order to be sure that children are populated. But the output of the method isn't used at all. Another case is request of the children's count. In both cases it doesn't make sense to make children's copy. So it's suggested to introduce two new methods. The AbstractComponent is an abstract implementation of the Component interface. I put the methods to the class but not to the interface at first because the performance experiments proofed that it is sufficient. And also it should reduce impact to backward compatibility. Though I'm quite sure AbstractComponent class is the only direct implementation of Component interface.
Created attachment 85498 [details] The diff with the main changes is going to be applied
The diff shows the new methods concrete, not abstract. (Which is good.)
Created attachment 85721 [details] The corrected diff. I mainly improved javadoc comments and made the version change smaller
Adding new methods doesn't prevent using old style approach - getChildren() or getChildren().size() So the it doesn't affect any code, which remains unchanged.
Fixed in trunk http://hg.netbeans.org/main/rev/13a148091090
Fixed
Verified with JUnit tests + verifying different BPEL projects
Integrated into 'main-golden', will be available in build *200908060201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main-golden/rev/13a148091090 User: supernikita@netbeans.org Log: #169510 - Schema model optimization by avoiding array copying
The fix has been ported into the release67_fixes repository. http://hg.netbeans.org/release67_fixes/rev/542505351438 http://hg.netbeans.org/release67_fixes/rev/3f5c7203b728
Verified by Michael Nazarov.