Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » EMF 2.9 memory improvements
EMF 2.9 memory improvements [message #1137923] Mon, 14 October 2013 20:57 Go to next message
Ambros Morscher is currently offline Ambros MorscherFriend
Messages: 28
Registered: June 2010
Junior Member
We have an EMF application using emf core 2.7.2. We are currently trying to reduce used heap memory beacuse our application exceeds certain limits.
We are already using Binary resources, MinimalEObject and Boolean Flags Field to save memory.

I am currently trying to switch to emf 2.9.2 which is supposed to have memory improvements for handling URIs. Has anyone some more specific information about that?
What kind of savings could I expect?
Are there any new specific API utilities to use to save heap memory or is there a benefit 'out-of-the-box'.

Thanks for your answers.

Cheers Ambros

Re: EMF 2.9 memory improvements [message #1138351 is a reply to message #1137923] Tue, 15 October 2013 03:54 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Ambros,

Yes, the URI implementation in 2.9 should improve their overhead
significantly, but now significant that over head in the first place
depends a lot on your application, and in particular on how heavily you
use cross document proxies. For Xtext-based applications this proved to
be a significant savings. There's nothing specific you need to do to
benefit.

In a great many applications that I've looked at the biggest consumer of
memory is often strings. For that, utilities such as CommonUtil.intern
can be useful.

Also, for Binary resources,
org.eclipse.emf.ecore.resource.impl.BinaryResourceImpl.OPTION_STYLE_DATA_CONVERTER
can prove to be quite useful. You can use it to tabulate frequently
recurring data values. The option will also help compress any Strings
and URIs already used in the serialization. For an Xtext index, the
footprint reduction was often a much as 90%.

To give proper advice, I'd really need to see what's currently using up
your memory the most...


On 14/10/2013 10:57 PM, Ambros Morscher wrote:
> We have an EMF application using emf core 2.7.2. We are currently
> trying to reduce used heap memory beacuse our application exceeds
> certain limits.
> We are already using Binary resources, MinimalEObject and Boolean
> Flags Field to save memory.
>
> I am currently trying to switch to emf 2.9.2 which is supposed to have
> memory improvements for handling URIs. Has anyone some more specific
> information about that?
> What kind of savings could I expect?
> Are there any new specific API utilities to use to save heap memory or
> is there a benefit 'out-of-the-box'.
>
> Thanks for your answers.
>
> Cheers Ambros
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF 2.9 memory improvements [message #1138872 is a reply to message #1138351] Tue, 15 October 2013 11:35 Go to previous messageGo to next message
Ambros Morscher is currently offline Ambros MorscherFriend
Messages: 28
Registered: June 2010
Junior Member
Hi Ed,

Thanks for your answer!
Do you remember we met each other @astrium. I am one of the guys developing a statelite database application using EMF.

I have made some memory analysis using MemoryAnalyzer. Would you have time to have a look at this?
Is it sufficient to give you the report or would you prefer the complete heap dump?
And indeed it looks like that most consuming objects are Strings.

[Updated on: Tue, 15 October 2013 11:36]

Report message to a moderator

Re: EMF 2.9 memory improvements [message #1138890 is a reply to message #1138351] Tue, 15 October 2013 11:47 Go to previous messageGo to next message
Ambros Morscher is currently offline Ambros MorscherFriend
Messages: 28
Registered: June 2010
Junior Member
Ed Merks wrote on Mon, 14 October 2013 23:54
Ambros,

Yes, the URI implementation in 2.9 should improve their overhead
significantly, but now significant that over head in the first place
depends a lot on your application, and in particular on how heavily you
use cross document proxies. For Xtext-based applications this proved to
be a significant savings. There's nothing specific you need to do to
benefit.


Is there a re-generation of code required? I suppose not.

Re: EMF 2.9 memory improvements [message #1138920 is a reply to message #1138890] Tue, 15 October 2013 12:09 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
Ambros,

None of this requires regeneration. I'm so bad with names, though not
with faces, and of course I remember spending time at Astrium! And yes,
I'd be interested to see a summary of the memory consumption. I've only
used YourKit for memory analysis so far...


On 15/10/2013 1:47 PM, Ambros Morscher wrote:
> Ed Merks wrote on Mon, 14 October 2013 23:54
>> Ambros,
>>
>> Yes, the URI implementation in 2.9 should improve their overhead
>> significantly, but now significant that over head in the first place
>> depends a lot on your application, and in particular on how heavily
>> you use cross document proxies. For Xtext-based applications this
>> proved to be a significant savings. There's nothing specific you need
>> to do to benefit.
>
>
> Is there a re-generation of code required? I suppose not.
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: EMF 2.9 memory improvements [message #1139113 is a reply to message #1138920] Tue, 15 October 2013 14:50 Go to previous message
Ambros Morscher is currently offline Ambros MorscherFriend
Messages: 28
Registered: June 2010
Junior Member
[quote title=Ed Merks wrote on Tue, 15 October 2013 08:09]Ambros,

None of this requires regeneration. I'm so bad with names, though not
with faces, and of course I remember spending time at Astrium! And yes,
I'd be interested to see a summary of the memory consumption. I've only
used YourKit for memory analysis so far...
[quote]

Regarding names it is the same for me ... very dynamic memory Smile ... but of course i remember yours ... we did the presentation of our database tools and how we leveraged EMF technologies OK but back to topic ...

OK I will check if I can provide you HPROF heap dump.
Would this be sufficient for you?

Thanks for your help!

[Updated on: Tue, 15 October 2013 15:02]

Report message to a moderator

Previous Topic:Re: [CDO] Code Review for a faster Horizontal Mapping
Next Topic:Switch between editable and readonly for an EMF property
Goto Forum:
  


Current Time: Thu Apr 25 06:53:44 GMT 2024

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

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

Back to the top