Community
Participate
Working Groups
Created attachment 268797 [details] Mem-Efficient-Dom-Factory Model Conversion for large (i.e. AUTOSAR models) has a few setbacks: org.eclipse.sphinx.emf.resource.AbstractModelConverter.convertSave(XMLString, int, URI, OutputStream, String, XMLHelper, Map<?, ?>) * uses two Threads to serialize the XMLString and read it back into a DOM structure. * The JDOM factory that is being used does not do string deduplication. Suggested are the follwing changes: * Use the attached XMLStringReader implementation and * Use the attached InterningJDOMFactory The lines from PipedInputStream pipedInputStream = new PipedInputStream(); to final Document document = new SAXBuilder() .... can just be replaced with final Document document = new SAXBuilder().build(new XMLStringReader(xml)); No more threading involved. As a 2nd step, we use the new JDOM factory by replacing the line above with SAXBuilder builder = new SAXBuilder(); builder.setFactory(new InterningJDOMFactory()); final Document document = builder.build(new XMLStringReader(xml)); I think both files should go into package org.eclipse.sphinx.emf.resource
Created attachment 268798 [details] XMLString-REader
Closed stale issue before migration