|
|
|
Re: Very Big Model [message #524014 is a reply to message #523508] |
Tue, 30 March 2010 01:32  |
Eclipse User |
|
|
|
Hi,
you can have your model distributed over several files by using
non-containment relationships for your EReferences.
This way you can have subtrees stored in different resources (they must
be added to separate resources using
resource_x.getConteint().add(subtreeNode)).
If you load the "root" object tree, then the referenced subtrees from
the separate files remain transparent proxies and only when you access
them, they are loaded.
The drawback is, however, they are not automatically unloaded, you have
to unload them manually yourself (using resource.unload()).
As Eike said, you could use CDO instead. CDO stores the object tree in a
backend (e.g., a database) and manages the proxies automatically, so
only the objects you currently use are contained in your memory and if
you don't use them anymore, they are unloaded and transparently proxied
again.
Cheers,
Stefan
Am 26.03.2010 17:14, schrieb Benoit Ferrero:
> We are a Very Big Instance of Model .
>
>
> When we save a model , We are a Memory Error
>
> the file is incomplete and have a size of 130MByte.
> It's possible to split a Model in many file ?
> It's possible to have a part of Model in Memory and the other on the
> disk ?
>
>
>
>
> Thanks for any help :)
> Benoit
>
> PS Example of Error Stack :
>
> java.lang.OutOfMemoryError: Java heap space
>
> at java.util.Arrays.copyOf(Unknown Source)
> at java.io.ByteArrayOutputStream.write(Unknown Source)
> at org.eclipse.emf.ecore.xmi.impl.StringSegment.writeAscii(Stri
> ngSegment.java:333)
> at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.writeAscii(XMLSav
> eImpl.java:997)
> at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.
> java:260)
> at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLRes
> ourceImpl.java:205)
> at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour
> ceImpl.java:1344)
> at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(Resour
> ceImpl.java:986)
> at fr.inria.aoste.ccslmodel.debug.model.MySimulationEngine.writ
> eTrace(MySimulationEngine.java:819)
> ....
|
|
|
Powered by
FUDForum. Page generated in 0.30040 seconds