Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Memory-saving strategies (e.g. Partial XMI loading)?
Memory-saving strategies (e.g. Partial XMI loading)? [message #415994] Tue, 15 January 2008 16:00 Go to next message
Stefan Winkler is currently offline Stefan WinklerFriend
Messages: 307
Registered: July 2009
Location: Germany
Senior Member
Hi all,

what are best practices to keep the memory consumption of models as
small as possible? Any pointers or hints concerning this topic are welcome.

I did some memory profiling tests this week and found out that a simple
EObject containing one String attribute (100 chars) can be created about
3,500,000 times with 1GB of Java heap space. While this may seem enough
for most people, I am not able to predict, if this is enough for my project.

So I am looking for ways to deal with more than 3,500,000 objects.
One idea that came to me was to only keep parts of the models in memory
while loading needed EObjects lazyly. Is there a simple way to achieve
this?

Do I always have to load an XMI entirely? If yes, could I store each
EObject in a separate XMI and use inter-file-references?

Any other ideas on this subject?

Cheers,
Stefan
Re: Memory-saving strategies (e.g. Partial XMI loading)? [message #415997 is a reply to message #415994] Tue, 15 January 2008 16:23 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33142
Registered: July 2009
Senior Member
Stefan,

Splitting your instance across multiple resources can help a lot since
resources themselves are loaded on demand. But the contents of a single
resource are processed in their entirety so having one huge resource is
not a great approach. Technologies like Teneo and CDO in the EMFT
project support more lazy forms of loading, but are backed by a
database, not XMI files. SDO exploits EMF's EStore API which
essentially allows you to treat your EObjects as wrappers that delegate
to a store where the real data lives and then the store itself can be
managed using whatever smart technique make sense.


Stefan Winkler wrote:
> Hi all,
>
> what are best practices to keep the memory consumption of models as
> small as possible? Any pointers or hints concerning this topic are
> welcome.
>
> I did some memory profiling tests this week and found out that a
> simple EObject containing one String attribute (100 chars) can be
> created about 3,500,000 times with 1GB of Java heap space. While this
> may seem enough for most people, I am not able to predict, if this is
> enough for my project.
>
> So I am looking for ways to deal with more than 3,500,000 objects.
> One idea that came to me was to only keep parts of the models in
> memory while loading needed EObjects lazyly. Is there a simple way to
> achieve this?
>
> Do I always have to load an XMI entirely? If yes, could I store each
> EObject in a separate XMI and use inter-file-references?
>
> Any other ideas on this subject?
>
> Cheers,
> Stefan


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:ordering of eContents
Next Topic:SetCommand fails for EMap ?
Goto Forum:
  


Current Time: Fri Apr 26 20:14:03 GMT 2024

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

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

Back to the top