Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Can CDOView#queryInstances limit results by CDOResource?
[CDO] Can CDOView#queryInstances limit results by CDOResource? [message #1722254] Wed, 03 February 2016 15:39 Go to next message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 597
Registered: January 2010
Location: Birmingham, UK
Senior Member

Hi all,

In our integration between CDO and Epsilon, we've started to use CDOView#queryInstances as it can provide some nice performance increases in some cases: it's much better than iterating through the resource.

However, we've noticed that it returns all the instances in the whole repository and not just the instances in the CDOResource we're working with. If we have 2 instances of X in /f.xmi and 1 in /g.xmi, and we've specified that we want to work on /input.xmi, we'd like to only see 2 instances and not 3.

Is there any way to limit its scope? So far we're limiting it on the client, but it'd be nice if the server never sent that unwanted object anyway.

Kind regards,
Antonio
Re: [CDO] Can CDOView#queryInstances limit results by CDOResource? [message #1722258 is a reply to message #1722254] Wed, 03 February 2016 15:52 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6684
Registered: July 2009
Senior Member
Am 03.02.2016 um 16:40 schrieb Antonio Garcia-Dominguez:
> Hi all,
>
> In our integration between CDO and Epsilon, we've started to use CDOView#queryInstances as it can provide some nice
> performance increases in some cases: it's much better than iterating through the resource.
Yes, although iteration can be optimized by prefetching, e.g.:

cdoResource.cdoPrefetch(CDORevision.DEPTH_INFINITE);


>
> However, we've noticed that it returns all the instances in the whole repository and not just the instances in the
> CDOResource we're working with.
Yes.

> If we have 2 instances of X in /f.xmi and 1 in /g.xmi, and we've specified that we want to work on /input.xmi, we'd
> like to only see 2 instances and not 3.
I'm not sure how /input.xmi relates to /f.xmi, but I guess you mean the same thing?

>
> Is there any way to limit its scope? So far we're limiting it on the client, but it'd be nice if the server never sent
> that unwanted object anyway.
No, there's currently no way to limit the results to only those that are contained by some scope object. Generally the
computation "is object X contained by object Y?" involves visiting all parents of X up to either Y or the root resource.
That's quite expensive, so we've almost nowhere provided such scoping. Given that it would be optional here and if
you're willing to provide a patch, we could consider adding such scoping.

Cheers
/Eike

----
http://www.esc-net.de
http://thegordian.blogspot.com
http://twitter.com/eikestepper


Re: [CDO] Can CDOView#queryInstances limit results by CDOResource? [message #1722268 is a reply to message #1722258] Wed, 03 February 2016 16:30 Go to previous message
Antonio Garcia-Dominguez is currently offline Antonio Garcia-DominguezFriend
Messages: 597
Registered: January 2010
Location: Birmingham, UK
Senior Member

Yes, we tried prefetching and it didn't work as well (we only need a very small subset of a reasonably large model). Using a packet sniffer to watch the TCP connection, we measured ~50MB doing iteration + prefetching and 211kB with queryInstances.

And also yes, I meant /f.xmi and not /input.xmi Smile. Sorry for the slip.

Thanks for the info! We'll see if we can provide a patch once the schedule clears up a bit.

Previous Topic:Augment existing plugin to generate UML diagrams from custom model
Next Topic:Formatter
Goto Forum:
  


Current Time: Sat Jul 20 11:04:27 GMT 2024

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

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

Back to the top