Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Performance of Intrinsic Vs Extrinsic ID
Performance of Intrinsic Vs Extrinsic ID [message #1096284] Wed, 28 August 2013 07:30 Go to next message
John Mark is currently offline John MarkFriend
Messages: 13
Registered: November 2012
Junior Member
I am trying to decide wether to use Intrinsic ID or Extrinsic ID for my GMF Based modeller.

Can you tell me -

1. For intrinsic ID i know we can provide a Cache of ID vs EObject mapping to improve performance. But how does object resolution for Extrinsic ID work?

2. Is there any disadvantage of using Extrinsic ID which can affect performance?

Re: Performance of Intrinsic Vs Extrinsic ID [message #1096307 is a reply to message #1096284] Wed, 28 August 2013 07:59 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
John,

Comments below.

On 28/08/2013 9:30 AM, John Mark wrote:
> I am trying to decide wether to use Intrinsic ID or Extrinsic ID for
> my GMF Based modeller.
>
> Can you tell me -
> 1. For intrinsic ID i know we can provide a Cache of ID vs EObject
> mapping to improve performance. But how does object resolution for
> Extrinsic ID work?
Much the same
org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.getEObjectByID(String)
>
> 2. Is there any disadvantage of using Extrinsic ID which can affect
> performance?
UUIDs are large and the mapping is needed in both directions. I recall
I once estimated that the memory overhead of an extrinsic UUID at around
170 bytes per object (on a 32bit VM) so that's quite extreme.

Better not to use IDs at all if possible, i.e., if your object tree has
a good naming structure that's amenable to using EReference.eKeys for
your containment references.
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Performance of Intrinsic Vs Extrinsic ID [message #1152615 is a reply to message #1096307] Thu, 24 October 2013 04:39 Go to previous messageGo to next message
John Mark is currently offline John MarkFriend
Messages: 13
Registered: November 2012
Junior Member
Thanks for your reply.

For intrinsic ID there is a method called resource.setIntrinsicIDToEObjectMap(map) to create a cache for intrinsic ID.

How do I setup cache for Extrinsic ID? Or is it automatically handled?
Re: Performance of Intrinsic Vs Extrinsic ID [message #1152702 is a reply to message #1152615] Thu, 24 October 2013 05:53 Go to previous message
Ed Merks is currently offline Ed MerksFriend
Messages: 33140
Registered: July 2009
Senior Member
John,

Comments below.

On 24/10/2013 6:39 AM, John Mark wrote:
> Thanks for your reply.
>
> For intrinsic ID there is a method called
> resource.setIntrinsicIDToEObjectMap(map) to create a cache for
> intrinsic ID.
Yes, on ResourceImpl.
>
> How do I setup cache for Extrinsic ID?
XMIResourceImpl already has such a cache.
> Or is it automatically handled?
Yes, after all, it must be stored somewhere if it's not not on the
objects themselves.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:[cdo] Embedded CDO server
Next Topic:EAnnotation information is only added to javadoc if annotation has at least one key/value
Goto Forum:
  


Current Time: Thu Apr 25 06:02:14 GMT 2024

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

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

Back to the top