Copy objects in TrackedList into ObjectContainer

6 posts, 0 answers
  1. Carsten
    Carsten avatar
    9 posts
    Member since:
    Sep 2008

    Posted 14 Jul 2011 Link to this post

    Hello,

    we have a performance problem when we loop a TrackedList in an ObjectContainer.

    Normally we copy a single root element into the container and navigate over its properties to load other objects by the ResolveProxy into the container. All childs of the root element are represented by a proxy object in the container.
    The ResolveProxy event will merge a child object into the container when we navigate on it.

    Up to this point everything works fine.

    The problem occurs when the child objects are in a list and we loop over the list all objects are fetched separately by the ResolveProxy.
    One of our customers has filled up a list with thousands of objects, so it takes a very long time to copy each object separately into the ObjectContainer.

    Now we want to copy the whole list in one piece into the container when it is accessed inside the Container. But it is necessary that the ResolveProxy event (ResolveProxyEventArgs/ProxyIdentity) deliver all ObjectIds of the objects in the list.

    I have started a try with fetchgroups, but i didn't manage the ResolveProxyEventArgs to contain more than one ObjectId.

    Is there a way to speed up this behavior?

    Greetings

    Carsten

  2. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 14 Jul 2011 Link to this post

    Hi Carsten,
    You have to optimize the load behavior of your root object. If you are in the resolve proxy it is already too late.

    Greetings,
    Jan Blessenohl
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  3. DevCraft banner
  4. Carsten
    Carsten avatar
    9 posts
    Member since:
    Sep 2008

    Posted 18 Jul 2011 Link to this post

    Hi Jan,

    i know that it is too late when we are in the resolve proxy, but what is the way to modify the load behavior in this case?
    At the moment i have no idea.

    Greetings

    Carsten
  5. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 18 Jul 2011 Link to this post

    Hi Carsten,
    Where are you putting the first object in the container? Are you knowing the use case there?

    All the best,
    Jan Blessenohl
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

  6. Carsten
    Carsten avatar
    9 posts
    Member since:
    Sep 2008

    Posted 19 Jul 2011 Link to this post

    Hi Jan,

    our normal use case is copying a root object in the container and displaying the data of its direct childs.
    That is the reason for looping all lists of the rootelement.

    Greetings

    Carsten
  7. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 19 Jul 2011 Link to this post

    Hello Carsten,
    I remember your generic mechanism to use the container as nested transactions. What you can try is to call Retrieve(pc, fp) on the object, but with the risk that we are loading to much data. You can try with a fetchplan with your required depth and FetchPlan.All as fetch group. Please pass the plan directly to the retrieve call.

    Greetings,
    Jan Blessenohl
    the Telerik team

    Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Back to Top
DevCraft banner