|Re: EObject to String for bigger models [message #659083 is a reply to message #659081]
||Thu, 10 March 2011 22:14
| Ed Merks
Registered: July 2009
Otto von Wesendonk wrote:
> in order to serialize eobjects to strings, I copy the eobject, add it
> to a new, "virtual" resource and then save it using a StringWriter as
> outputstream. Since the models are getting bigger now, this approach
> is becoming a bottleneck.
> I was wondering how hard it would be to short-circuit the XMLSaveImpl
> class in order to serialize the original eobject without having to
> copying it or it loosing its resource and so on. Which steps would be
> necessary and is this a good idea anyway?
Using this option with the resource that really contains some ancestor.
* Write only the subtree starting at the specified list of EObjects,
* which must be objects contained by the resource.
String OPTION_ROOT_OBJECTS = "ROOT_OBJECTS";
> The eobjects which are serialized are in a self-contained tree. (They
> are saved in multiple resources using cross-resource containment
> links, but I don't think this matters, since they are fully loaded to
> RAM at time of serialization anyway).
> Any hints or ideas?
> Thanks in advance,
Powered by FUDForum
. Page generated in 0.02289 seconds