1

I am on SDL Tridon 2013, Using Core services I have to export all site content. I am looking for a performance way of doing it. I have used loadXml based on the publication id and itemtype page to get tcm id of the page. Now Iterating over pages and their presentation component getting data seems to be taking too much time using the getItem query. is there another way to get it real quick?

    var listOfPages=SessionAwareCoreServiceClient.GetListXml(tcmId, filter)
    
    //loop over list & get page info using     
    var pageData=SessionAwareCoreServiceClient.Read(tcmId, options)

  foreach (var componentPresentation in pageData.ComponentPresentations)
            {
    //get content of each component with field name and value
    }
    
3
  • I'm confused... you're saying that you are using the Core Service and using loadXml and getItem queries. But neither are operations exposed by the Core Service. Can you maybe provide a code sample of what you are doing? Mar 1 at 12:16
  • edited and added in question
    – FHN
    Mar 1 at 14:54
  • Ah, so loadXml == GetListXml and getItem == Read :-) Mar 9 at 8:47

2 Answers 2

1

There are several ways to improve the performance of your SDL Tridion content export using Core Services:

  • Use a Batch Process: Instead of making individual requests to retrieve each page and its components, you can use a batch process to retrieve multiple pages and their components in a single request. This will reduce the number of round trips between your application and the Content Manager, which can significantly improve performance.

  • Use the Select Query: Instead of using the getItem query to retrieve each component, you can use the select query to retrieve multiple components in a single request. This will again reduce the number of round trips between your application and the Content Manager.

  • Use Caching: If you are exporting content repeatedly, you can use caching to store the results of your queries. This will allow you to retrieve the content more quickly on subsequent exports, since the content will already be stored in memory.

  • Use the TOM.NET API: If you are using the SDL Tridion 2013 TOM.NET API, you can use the GetListItems method to retrieve multiple pages and their components in a single request. This is similar to the batch process approach described above, but uses the TOM.NET API instead of Core Services.

  • Use Multithreading: If you have a large amount of content to export, you can use multithreading to retrieve the content in parallel. This can significantly improve performance, since multiple requests can be processed simultaneously.

By implementing these techniques, you can significantly improve the performance of your SDL Tridion content export using Core Services.

1
  • is there some documenation/example using Batch Process or Select Query ? I have to extract component wise content and meta data of all the pages
    – FHN
    Mar 1 at 11:30
0

Reading all Pages will be an expensive operation; you can forget about "another way to get it real quick".

Note that the Core Service also has a BulkRead method, which allows you to read multiple items in one server roundtrip. This will be more efficient than tons of individual roundtrips, but you have to beware of the size of the response.

What you could do is split the list into multiple pages (with a max size of, say, 100) and then do a BulkRead request for each page.

Since you only need IDs from the GetListXml method, ensure to set filter.BaseColumns = ListBaseColumns.Id for best list performance.

2
  • I am getting page list like you suggested, now based on ID of each page I am getting Page Data . Major performance I am observing on looping over PresentationComponent and getting content of each component fields. I am under assumption there should be a way to get all field value & its related linked item e.g for CTA and Multi media type field in one go , Not able to find a way of it.
    – FHN
    Mar 9 at 11:11
  • You can bulk-read the Pages first and then bulk-read the Components on those pages. Again, that will be more efficient than reading all items individually, but beware of response sizes. There is no way to read Pages with the Components embedded. Mar 13 at 8:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.