Performance boost on removing data from a large XPCollection (available in 11.1.7)

XPO Team Blog
12 September 2011

I am happy to announce that XPO developers have tweaked XPCollection in version 11.1.7, and trust me, it is something you will notice immediately. This improvement was accomplished while working on a customer's issue and that again proves how customer feedback is invaluable to us.

Generally, XPCollection will perform several times faster on removing objects from large associated 1-M or M-M details collections. Certainly, the exact speed improvement will depend on the collection size, the complexity of your object graphs and other factors. Also, you will be interested to know that we achieved this by optimizing the removal algorithm that sets a reference to a master object to null (you can improve your familiarity with associations in XPO by reading this KB Article).

To demonstrate these improvements in action, I built a small console application with a couple of persistent classes, with a 1-M relationship between them. My test applications first created several master objects (5 and 10) with several thousand details (5000 and 10000) in each, committed them all to the Microsoft SQL Server database and then ran another loop to delete each master and its details from the database. Time was measured for the remove operation performed for each master object. Test applications were built in the Release configuration (+ Any CPU) against .NET 4.0 and the 10.2.9 and 11.1.7 versions of XPO. You can download test applications as well as screenshots showing the results using the links below:

During tests, most noticeable (~3-4 times faster) improvements occurred when the details collection was comprised of 10000 objects:





It was ~2x faster on 5000 details. I expect improvements will be more noticeable (maybe dozen and hundreds times faster) the greater the size of the details collection.

The good news is that more performance improvements are coming in v2011 vol2! I am preparing another blog post about this, and hope to publish it this week. Stay tuned, and please let us know how much better your real XPO applications perform in 11.1.7. Thank you in advance!

Happy XPOing!Winking smile

Free DevExpress Products - Get Your Copy Today

The following free DevExpress product offers remain available. Should you have any questions about the free offers below, please submit a ticket via the DevExpress Support Center at your convenience. We'll be happy to follow-up.
No Comments

Please login or register to post comments.