Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [CDO] Skipping EClasses/EStructuralFeatures from prefetch
[CDO] Skipping EClasses/EStructuralFeatures from prefetch [message #994182] Wed, 26 December 2012 16:30 Go to next message
Guido Scalise is currently offline Guido ScaliseFriend
Messages: 16
Registered: April 2012
Junior Member
I'm trying to force a prefetch of a 4-level object tree, but one of the levels has a couple of structural features I want to avoid from prefetching for performance and bandwidth reasons.

I've tried putting a CDOFetchRule before prefetching and I've seen the CDOFetchRule arriving to the LoadRevisionsIndication in the server, but it doesn't do anything with it. Is there a straightforward way of telling the CDO server not to fetch/serialize an EClass or a EStructuralFeature?

Regards,
Guido

[Updated on: Wed, 26 December 2012 19:13]

Report message to a moderator

Re: [CDO] Skipping EClasses/EStructuralFeatures from prefetch [message #994226 is a reply to message #994182] Wed, 26 December 2012 19:38 Go to previous messageGo to next message
Guido Scalise is currently offline Guido ScaliseFriend
Messages: 16
Registered: April 2012
Junior Member
Well, I've been investigating how the multilevel prefetch works, and I've made a *very* small modification in org.eclipse.emf.cdo.server.internal.net4j.protocol.LoadRevisionsIndication that allows me to set an arbitrary set of EClass/EStructuralFeature combinations and skip them from the prefetch operation, thus eliminating the associated Store access and network load of the pruned elements.

This change doesn't add any new data to the LoadRevisionsRequest signal payload nor to the client semantics, as the payload already contains a list of CDOFetchRule elements, which are set by using the Session's CDOFetchRuleManager (it defaults to the NOOPFetchRuleManager, which doesn't set any CDOFetchRules on the outgoing LoadRevisionsRequests).

One thing to consider is that while the API itself doesn't change, the behavior of cdoPrefetch(int depth) does change -only when CDOFetchRules are set-, so any clients already combining cdoPrefetch and CDOFetchRules might need to be reviewed to ensure that this change doesn't affect them.

If you are interested in the patch, I can post it to bugzilla or send a pull request.

Regards,
Guido

[Updated on: Wed, 26 December 2012 19:49]

Report message to a moderator

Re: [CDO] Skipping EClasses/EStructuralFeatures from prefetch [message #994398 is a reply to message #994226] Thu, 27 December 2012 07:23 Go to previous messageGo to next message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Hi Guido,

Yes, I'm always interested in enhancements and prefetching is a recurring topic. I'll review your changes if you attach
a patch to a bugzilla.

Cheers
/Eike

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


Am 26.12.2012 20:38, schrieb Guido Scalise:
> Well, I've been investigating how the multilevel prefetch works, and I've made a *very* small modification in
> org.eclipse.emf.cdo.server.internal.net4j.protocol.LoadRevisionsIndication that allows me to set an arbitrary set of
> EClass/EStructuralFeature combinations and skip them from the prefetch, thus eliminating the associated network load.
>
> This change doesn't add any new data to the LoadRevisionsRequest signal payload nor to the client semantics, as the
> payload already contains a list of CDOFetchRule elements, which are set by using the Session's CDOFetchRuleManager (it
> defaults to the NOOPFetchRuleManager, which doesn't set any CDOFetchRules on the outgoing LoadRevisionsRequests).
> One thing to consider is that while the API itself doesn't change, the behavior of cdoPrefetch(int depth) does change
> -only when CDOFetchRules are set-, so any clients already combining cdoPrefetch and CDOFetchRules might need to be
> reviewed to ensure that this change doesn't affect them.
>
> If you are interested in the patch, I can post it to bugzilla or send a pull request.
>
> Regards,
> Guido


Re: [CDO] Skipping EClasses/EStructuralFeatures from prefetch [message #994510 is a reply to message #994398] Thu, 27 December 2012 14:28 Go to previous messageGo to next message
Guido Scalise is currently offline Guido ScaliseFriend
Messages: 16
Registered: April 2012
Junior Member
Here's the bug report with the patch attached: https://bugs.eclipse.org/bugs/show_bug.cgi?id=397189

Regards,
Guido
Re: [CDO] Skipping EClasses/EStructuralFeatures from prefetch [message #994550 is a reply to message #994510] Thu, 27 December 2012 16:41 Go to previous message
Eike Stepper is currently offline Eike StepperFriend
Messages: 6682
Registered: July 2009
Senior Member
Am 27.12.2012 15:28, schrieb Guido Scalise:
> Here's the bug report with the patch attached: https://bugs.eclipse.org/bugs/show_bug.cgi?id=397189
Thank you! To look at it will be one of my first tasks next year...

Cheers
/Eike

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


Previous Topic:Xcore vs EntityDSL
Next Topic:[CDO] HibernateStore MappingException: Unknown entity: CDORevisionImpl
Goto Forum:
  


Current Time: Fri Apr 19 08:30:55 GMT 2024

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

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

Back to the top