Skip to main content



      Home
Home » Modeling » EMF » Performance of Intrinsic Vs Extrinsic ID
Performance of Intrinsic Vs Extrinsic ID [message #1096284] Wed, 28 August 2013 03:30 Go to next message
Eclipse UserFriend
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 03:59 Go to previous messageGo to next message
Eclipse UserFriend
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.
>
>
Re: Performance of Intrinsic Vs Extrinsic ID [message #1152615 is a reply to message #1096307] Thu, 24 October 2013 00:39 Go to previous messageGo to next message
Eclipse UserFriend
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 01:53 Go to previous message
Eclipse UserFriend
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.
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: Sat Jul 12 19:42:06 EDT 2025

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

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

Back to the top