Performance-Issue, group elements

MrG <[email protected]>
Newsgroups gmane.text.xml.batik.user
Message-ID <[email protected]>
hi, i try to group a lot of elements (>1000).

this is my code at the moment:

-----------------------------------------------------------
Element group = editor.doc.createElementNS(editor.svgNS,
SVGConstants.SVG_G_TAG);
group.setAttributeNS(null, "id", groupID);

for(int i=0; i<nodes.size(); i++) {
	group.appendChild(nodes.get(i));
}
  
editor.doc.getRootElement().appendChild(group);
-----------------------------------------------------------

this takes a lot of time > 8s

is there a way to optimize grouping elements?

thanks!  
  



--
View this message in context: http://batik.2283329.n4.nabble.com/Performance-Issue-group-elements-tp4655381.html
Sent from the Batik - Users mailing list archive at Nabble.com.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.