|
Re: difference between using XMLResource.OPTION_BINARY and BinaryResourceImpl [message #1281608 is a reply to message #1281285] |
Tue, 01 April 2014 04:56 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Felix,
Comments below.
On 31/03/2014 6:58 PM, Felix Dorner wrote:
> Hi,
>
> I was asked to test to save/load some models in binary format.
> Currently the application uses XMLResource. Now I'm not sure if I just
> should enable XMLResource.OPTION_BINARY, or if I should replace the
> resource implementation itself (use BinaryResourceImpl) instead of
> XMLResourceImpl.
The only difference is that an XMLResourceImpl's doSave will save (and
load) the extrinsic ID map, whereas a BinaryResourceImpl has no such map
to save (and will ignore it when you load a serialization that has
one). If you're using EMF 2.9 or later, have a look at the
org.eclipse.emf.ecore.resource.impl.BinaryResourceImpl.OPTION_STYLE_DATA_CONVERTER;
it can dramatically reduce the size of the serialization when you have
many long strings, and can be exploited to reduce the size of other data
types you might be serializing.
>
> Any hints?
> Thanks,
> Felix
>
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03980 seconds