locked
Large file taking time RRS feed

  • Question

  • User-1129879462 posted

    I have an XML file with large volume of data and is taking time while applying XSLT.

    Is there any way I can improve performance?!

    Friday, September 9, 2016 5:42 PM

Answers

  • User36583972 posted

    Hi krisrajz,

    When you use XSLT to transform the content of an XML document into another XML document that has a different structure. You can consider the following ways to provide performance.

    1: Use the XPathDocument

    The XPathDocument class offers superior performance. Typically, transformations that use the XPathDocument class are 20 to 30 percent faster than the transformations that use the XmlDocument class once the documents have been loaded.

    2: Consider Caching Compiled Style Sheets

    XslTransform class can be cached in the ASP.NET application state.

    The following article describes in detail how to provide performance: Chapter 9 — Improving XML Performance:

    https://msdn.microsoft.com/en-us/library/ff647804.aspx

    Best Regards,

    Yohann Lu

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 12, 2016 9:02 AM