Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » difference between using XMLResource.OPTION_BINARY and BinaryResourceImpl
difference between using XMLResource.OPTION_BINARY and BinaryResourceImpl [message #1281285] Mon, 31 March 2014 16:58 Go to next message
Felix Dorner is currently offline Felix DornerFriend
Messages: 295
Registered: March 2012
Senior Member
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.

Any hints?
Thanks,
Felix
Re: difference between using XMLResource.OPTION_BINARY and BinaryResourceImpl [message #1281608 is a reply to message #1281285] Tue, 01 April 2014 04:56 Go to previous message
Ed Merks is currently offline Ed MerksFriend
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/
Previous Topic:[XCORE] Initializing a feature
Next Topic:ResourceImpl.unload triggers loading
Goto Forum:
  


Current Time: Fri Apr 26 01:02:18 GMT 2024

Powered by FUDForum. Page generated in 0.03980 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top