Blogs

XPO

eXpress Persistent Objects

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

     

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
Published Sep 13 2011, 08:00 AM by Dennis (DevExpress Support)
Bookmark and Share

Comments

 

Mohsen Benkhellat said:

Great news for 11.2

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

Thanks guys.

September 13, 2011 9:55 AM
 

Gustavo Marzioni said:

will this improvement reduce memory consumption?

September 13, 2011 10:14 AM
 

James Zhong said:

Great news for comprehensive business applications!

September 13, 2011 10:57 PM
 

Dennis (DevExpress Support) said:

@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.

September 14, 2011 6:25 AM
 

Francois Nel said:

Nice. Been waiting for this for a long time.

September 14, 2011 7:18 AM
 

Dennis (DevExpress Support) said:

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

September 14, 2011 8:30 AM
 

Thomas Grusche said:

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.

September 14, 2011 8:50 AM
 

Nate Laff said:

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.

September 14, 2011 10:54 AM
 

Dave Clark said:

Please get it released asap!!

September 15, 2011 5:29 AM
 

Thomas Grusche said:

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

September 15, 2011 5:31 AM
 

Nate Laff said:

Thomas,

I think that is Session.GetObjects() :)

September 19, 2011 1:29 PM
 

Thomas Grusche said:

Nate Laff,

GetCollection of XPBaseObject returns XPCollection :)

September 22, 2011 7:47 AM
 

Alexandre BOYER said:

When this version will be released ?

October 20, 2011 10:54 AM
 

M. V. said:

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

November 9, 2011 10:39 AM
 

Npc said:

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

November 18, 2011 12:06 PM
More from DevExpress
Live Chat
Have a pre-sales question?
Need assistance with your evaluation?
We are here to help.
Chat is one of the many ways you can contact members of the DevExpress Team. We are available Monday-Friday between 8:30am and 5:00pm Pacific Time.
If you need additional product information, require pre-sales assistance, or want help with your order, write to us at info@devexpress.com or call us at
+1 (818) 844-3383.