Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 516093
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T07:41:46+00:00 2026-05-13T07:41:46+00:00

Which is faster, XML with XSLT or CLR with DataBinding? I’m assuming that it’s

  • 0

Which is faster, XML with XSLT or CLR with DataBinding?
I’m assuming that it’s CLR + Databinding but I could be wrong.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T07:41:46+00:00Added an answer on May 13, 2026 at 7:41 am

    This is actually a question very close to my own heart, as almost all the work I do revolves around XSLT design layers with a custom .NET based backend that generates data (I love the system to death).

    To the best of my knowledge, there are a few things that should be kept in mind:

    • Make absolutely sure you use cached instances of System.Xml.Xsl.XslCompiledTransform. This class uses System.Reflection.Emit to create on demand classes that will absolutely PUMP OUT your xslt transformation incredibly fast

      • Use the right data structure as the input into your xslt transformations. If you have an XmlDocument (or better yet an XPathDocument) available, use that. Otherwise, for very large input documents and transformations pass in an xml reader (if available), since XslCompiledTransform will load the document into a XPathDocument (which are optimized for XPath access). Just to add, there exists an extension method in System.Xml.XPath for the System.Xml.Linq.XElement type that will create an XPathNavigator from a XElement, which will come in handy if your source data structure is an XElement

      • Do not use msxsl:script tags in your xsl transformations. msxsl:script tags are compiled differently than the rest of the xslt and can cause serious memory leaks in high-demand applications (they load custom assemblies EVERY TIME the xslt is run)

      • Avoid the use of extension methods as much as possible. I disassembled (reflector FTW) right down to the .NET source for executing extension methods in XSLT transformations and at the very heart it really is nothing more than a call to MethodInfo.Invoke(). A few calls won’t ruin your application, but don’t think you can make up for all of XSLT’s shortcomings using extension methods (might change in a future version of the framework, since they are caching extension methods in a custom hashing system, it is very possible that they could translate this to use compiled linq expressions, in which case it would be lightning fast)

      • To the best of my knowledge, System.Web.UI.DataBinder still boils down to a call in System.ComponentModel.ReflectPropertyDescriptor that uses System.Reflection.MethodInfo.Invoke() in order to evaluate Eval(“MyProperty”) statements. This is going to be one of the biggest comparisons in terms of performance between the two models. By minimizing the number of reflection calls, XSLTs get an upper hand here.

      • It is very very easy to write un-tuned xslt files. Proper use of xsl variables can really eliminate many of the iterations required to produce the xml output. If you have a commonly referenced input element, store it in an xsl variable an access it from there.

      • Depending on whether or not you plan on writing your xsl output directly to the response stream. Remember to size your buffers properly. By settings a default buffer size on your transformation MemoryStream’s you save yourself a massive amount of memory allocations (which are generally rather large in the context of an xsl transformation).

      • Although this really comes down to an application level concern. While using XSLT transformations you avoid the whole overhead of control creation, view state serialization, event persistence etc etc etc… Creates a much simpler page life cycle (get data, transform, with a few niceties thrown in between) with should give another edge to an XSLT based system.

    Overall, my money is DEFINITELY on a well structures properly implemented XSLT transformation. Especially on a system that has plenty of RAM available for the in memory transformations. I’ve seen XSLT transformations scale to a fairly incredible level, and once a few very key points are learned, it really isn’t that hard to maintain.

    Will see if I can remember any others and will edit this post if I do…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

No related questions found

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.