|Re: Reference elements by ID in Ecore model / xmi [message #1777305 is a reply to message #1777279]
||Tue, 28 November 2017 09:48
| Ed Merks
Registered: July 2009
It's impossible to know what might be special about your scenario that might lead to a performance problem and based on that insight might lead to a suggestion. I would try org.eclipse.emf.ecore.xmi.XMLResource.OPTION_DEFER_IDREF_RESOLUTION because if there are many forward references is wasteful to try to resolve them early. Probably OPTION_DEFER_ATTACHMENT won't help at all, but is worth a try. As a save option, OPTION_USE_ENCODED_ATTRIBUTE_STYLE will tend to produce a much more compact serialization.|
Alternatively you could use something like BinaryResourceImpl to load and save the instance. A binary a serialization is generally a small fraction of the size of the XML and loads generally an order of magnitude faster, but it's not human readable and would be less than ideal to put under version control.
If you end up needing truly massive amounts of data, you might explore using something like CDO.
Professional Support: https://www.macromodeling.com/
Powered by FUDForum
. Page generated in 0.02205 seconds