This is a migrated thread and some comments may be shown as answers.

Copy objects in TrackedList into ObjectContainer

5 Answers 101 Views
Development (API, general questions)
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Carsten
Top achievements
Rank 2
Carsten asked on 14 Jul 2011, 02:22 PM
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

5 Answers, 1 is accepted

Sort by
0
Jan Blessenohl
Telerik team
answered on 14 Jul 2011, 02:26 PM
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!

0
Carsten
Top achievements
Rank 2
answered on 18 Jul 2011, 07:59 AM
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
0
Jan Blessenohl
Telerik team
answered on 18 Jul 2011, 04:09 PM
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!

0
Carsten
Top achievements
Rank 2
answered on 19 Jul 2011, 08:14 AM
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
0
Jan Blessenohl
Telerik team
answered on 19 Jul 2011, 01:24 PM
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!

Tags
Development (API, general questions)
Asked by
Carsten
Top achievements
Rank 2
Answers by
Jan Blessenohl
Telerik team
Carsten
Top achievements
Rank 2
Share this question
or