|
Re: [CDO] Ecore lazy-loading [message #1227135 is a reply to message #1227002] |
Fri, 03 January 2014 16:38 |
|
Hi Przemko,
The JavaDoc you've mentioned is definitely wrong and I've just fixed it. From a CDO perspective Ecore is a legacy model
with all the scalability drawbacks. Lazy loading is not possible. On the other hand most Ecore models are fairly small
and prefetching the entire model resource should help a lot:
CDOUtil.getCDOObject(ePackage).cdoPrefetch(CDORevision.DEPTH_INFINITE);
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Am 03.01.2014 14:22, schrieb Przemko Robakowski:
> In our project we would like to store objects from Ecore package (i.e. we store epackages, eclasses etc) with CDO.
> Unfortunately Ecore is treated as legacy package (CDOPackageInfo.isSystemPackage javadoc says that Ecore should be
> recognize as native but it's not...).
> This leads to performance problem: when we for example load one eclass by cdoId, its epackage is also loaded with
> every elasses from it which is very slow (packages are rather big).
> Is there any possibility to use lazy loading with Ecore objects? Or maybe there is some workaround?
> Thanks!
> Przemko
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
|
Re: [CDO] Ecore lazy-loading [message #1242247 is a reply to message #1232176] |
Sun, 09 February 2014 08:05 |
|
Am 16.01.2014 12:10, schrieb Przemko Robakowski:
> Hi Eike,
>
> Thank you for clarification.
> The solution that you propose seems not working for me. First thing, if I already have ePackage in hand that means I
> loaded it already in the slow way, isn't it?
Hm, that's right. If you know the CDOID of the object to load you can use session-level API to load and prefetch the
needed CDORevisions before you wrap them into EObjects. For example there's this method in CDORevisionManager:
public CDORevision getRevision(CDOID id, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth,
boolean loadOnDemand);
The revision manager can be obtained with CDOSession.getRevisionManager().
Does that do the trick?
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
> And even if I do cdoPrefetch on CDOResource which contains ePackage in tracing I can still see multiple communications
> with CDO server for every small chunk of data. Even for really small model (like 20 classes with 5-6 attributes each)
> it takes about 5s to load 8o (server is n virtual machine in our local lan). Should it be so long?
>
> Cheers,
> Przemko
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Re: [CDO] Ecore lazy-loading [message #1242250 is a reply to message #1242247] |
Sun, 09 February 2014 08:08 |
|
BTW. if you submit an enhancement request we can certainly add more convenient API to CDOView, something like:
public CDORevision getRevision(CDOID id, int prefetchDepth);
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
Am 09.02.2014 09:05, schrieb Eike Stepper:
> Am 16.01.2014 12:10, schrieb Przemko Robakowski:
>> Hi Eike,
>>
>> Thank you for clarification.
>> The solution that you propose seems not working for me. First thing, if I already have ePackage in hand that means I
>> loaded it already in the slow way, isn't it?
> Hm, that's right. If you know the CDOID of the object to load you can use session-level API to load and prefetch the
> needed CDORevisions before you wrap them into EObjects. For example there's this method in CDORevisionManager:
>
> public CDORevision getRevision(CDOID id, CDOBranchPoint branchPoint, int referenceChunk, int prefetchDepth,
> boolean loadOnDemand);
>
> The revision manager can be obtained with CDOSession.getRevisionManager().
>
> Does that do the trick?
>
> Cheers
> /Eike
>
> ----
> http://www.esc-net.de
> http://thegordian.blogspot.com
> http://twitter.com/eikestepper
>
>
>> And even if I do cdoPrefetch on CDOResource which contains ePackage in tracing I can still see multiple
>> communications with CDO server for every small chunk of data. Even for really small model (like 20 classes with 5-6
>> attributes each) it takes about 5s to load 8o (server is n virtual machine in our local lan). Should it be so long?
>>
>> Cheers,
>> Przemko
>
Cheers
/Eike
----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper
|
|
|
Powered by
FUDForum. Page generated in 0.02752 seconds