XPO - 11.2 Sneak Peek – XPCollection performance improvements (once again!)

XPO Team Blog
13 September 2011

Prerequisites

As you probably know, when inserting or removing records from collections supporting IBindingList, it is necessary to load the entire collection (that means constructing its persistent objects and their related objects graphs) from the database. It is an understandable requirement (we need to fire the IBindingList.ListChanged event with correct indices), but it might drive to some XPO customers crazy. For example, if we inserted or removed an object from an associated details collection containing a lot of complex objects, it might become a performance problem.

Though there has been an unofficial solution (based on the use of IList collections instead of collections of XPCollection type) available for many years, it was not final and had some drawbacks (the need to redesign persistent classes, inability to access Criteria and other features of the XPCollection, data binding limitations, etc.). Finally, improving the current state of affairs has also been one of the most popular requests our customers asked  us for in recent years.

One-to-many associations are significantly faster in 11.2

Our developers have managed to work around the limitation described above in version 11.2, and trust me, it is something you will notice immediately. Generally, XPCollection will perform significantly faster on inserting and deleting objects into and from a large associated 1-M details collection. Certainly, the exact speed improvement will depend on the collection size, the complexity of your objects graphs and other factors. Note that these changes do not affect M-M details collections at this time, because this is a more difficult case. We will research it the future.

To test it in action, I used a modified version of the test application (you can download it here) from my previous blog. See my results below:

11.1.7

11.2.1

image image
image image

As you see, it is ~100x faster on insert and ~10x faster on removal when the details collection was comprised of 10000 objects. These improvements will be more noticeable, the greater the size of the details collection.

Do you like the XPO improvements? Please let us know your opinion!

Happy XPOing!

Winking smile
15 comment(s)
Mohsen Benkhellat
Mohsen Benkhellat

Great news for 11.2

Anything that could improve performance is always welcome in my book.

Thanks guys.

13 September, 2011
Gustavo Marzioni
Gustavo Marzioni

will this improvement reduce memory consumption?

13 September, 2011
James Zhong
James Zhong

Great news for comprehensive business applications!

13 September, 2011
Dennis (DevExpress)
Dennis (DevExpress)

@Gustavo: Sure. If the whole collection is not loaded on adding or removing objects, then less memory (by the amount required to hold this collection) will be allocated.

14 September, 2011
Francois Nel
Francois Nel

Nice. Been waiting for this for a long time.

14 September, 2011
Dennis (DevExpress)
Dennis (DevExpress)

We are glad to hear that you liked these improvements, guys!

14 September, 2011
Thomas Grusche 1
Thomas Grusche 1

Why not remove IBindingList implementation from XPCollection if it slows down the performance? How many of your customers bind it directly to UI? UI should be separated from DB.

14 September, 2011
Nate Laff
Nate Laff

Thomas,

I would think many do. I sure do, especially in quick apps. Drop the collection component and hook it up to the Grid. Done.

14 September, 2011
Dave Clark
Dave Clark

Please get it released asap!!

15 September, 2011
Thomas Grusche 1
Thomas Grusche 1

Would be great if DevEx could split the XPCollection to have the "low level" and "high level GUI" parts.

15 September, 2011
Nate Laff
Nate Laff

Thomas,

I think that is Session.GetObjects() :)

19 September, 2011
Thomas Grusche 1
Thomas Grusche 1

Nate Laff,

GetCollection of XPBaseObject returns XPCollection :)

22 September, 2011
Alexandre BOYER
Alexandre BOYER

When this version will be released ?

20 October, 2011
M. V.
M. V.

Great News, because Im experiencing a huge performance issue. I m eager to get this version and see the improvements.

9 November, 2011
NPC
NPC

That really will help us!  We are always making workarounds to solve this problem.   3 points basket !!!!

18 November, 2011

Please login or register to post comments.