Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Normally, if you see a non-linear increase in processing time vs. input size, you should suspect your code more than the framework. But since the problem goes away when the tool is compiled with .NET 2.0, all bets are off.</p> <p>With XSLT, it's hard to create a non-linear performance curve if you do all your parsing with straight template matches:</p> <pre><code>&lt;xsl:template match="foo"&gt; &lt;!--OUTPUT--&gt; &lt;xsl:apply-templates / &gt; &lt;!--OUTPUT--&gt; &lt;/xsl:template&gt; &lt;xsl:template match="bar"&gt; &lt;!--OUTPUT--&gt; &lt;xsl:apply-templates / &gt; &lt;!--OUTPUT--&gt; &lt;/xsl:template&gt; </code></pre> <p><strong>Pay careful attention to anywhere you might have resorted to <code>&lt;xsl:for-each&gt;</code></strong> for parsing; template matches are virtually always a better way to achieve the same result.</p> <p>One way to troubleshoot this performance problem is to recreate your XSLT one template-match at a time, testing the processing time after adding each match. You might start with this match:</p> <pre><code>&lt;xsl:template match="*"&gt; &lt;xsl:copy&gt; &lt;!--Copy node --&gt; &lt;xsl:copy-of select="@*"/&gt; &lt;!--Copy node attributes --&gt; &lt;xsl:apply-templates /&gt; &lt;!--Process children --&gt; &lt;/xsl:copy&gt; &lt;/xsl:template&gt; </code></pre> <p>This will match and copy every node, one at a time, to a new document. This should not exhibit a non-linear increase in processing time vs. input size (if it does, then the problem is not with your XSLT code).</p> <p>As you recreate your XSLT, if you add a template-match that suddenly kills performance, comment out every block inside the template. Then, uncomment one block at a time, testing the processing time each iteration, until you find the block that causes the problem.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload