Your memories of XML list methods performing better than the ones returning objects stem back from the early days of Tridion.
In the original (COM-based) TOM API, the XML list methods were wired up directly to the Data Access Layer and the methods which returned objects were implemented in a very primitive fashion: they internally invoked the XML list methods and then created TOM objects with only ID
and Title
properties pre-loaded; if you accessed any other object property, it would Just-In-Time load the entire object state.
So, typically, you would (maybe unknowingly) trigger an XML list plus individual reads for each item in the list. If the XML list contained all the data you needed, directly using it would be much faster.
Furthermore, the remote APIs (Business Connector and XML Responder) didn’t expose anything but the XML list.
The situation changed in the Tridion 2011 Release (aka “R6”), with the introduction of the TOM.NET and Core Service APIs. Internally, the wiring was done the other way around:
- The Data Access Layer exposes list methods returning (Data) Objects.
- The XML list methods internally use those Data Object lists and then serialize those Data Objects to R5 list XML (compatible with the XML lists from earlier releases).
- The Core Service list methods returning objects directly expose the Data Objects. Since this is a remote API, the Data Objects will be serialized too in this case. This happens using the WCF Data Contract Serializer which produces so-called R6 XML (per definition; R6 XML is whatever the WCF Data Contact Serializer outputs when it serializes CM Data Objects).
- The TOM.NET list methods which return object also internally use the Data Objects and wrap those in TOM.NET objects, which are pre-loaded with all the data available in the Data Objects. So, only if you access a property which is not available in the list data will a full load be triggered.
The difference between R5 list XML and R6 list XML is that the former is a bit more compact: R5 XML lists use XML attributes to contain the item properties, whereas R6 XML list use nested XML elements (again, this is just how the WCF Data Contract Serializer serializes the CM Data Objects).