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 7032197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:54:11+00:00 2026-05-28T00:54:11+00:00

I have an XSLT (running under Sitecore) that I’d like to benchmark. For example:

  • 0

I have an XSLT (running under Sitecore) that I’d like to benchmark.

For example:

<xsl:variable name="start_ms" select="TIME IN MILLIS" />

Do something

<xsl:variable name="end_ms" select="TIME IN MILLIS" />
<xsl:variable name="total_ms" select="$end_ms - $start_ms" />

Do something else

Unfortunately I can’t manage to get the time to milliseconds accuracy.

If I include xmlns:date="http://exslt.org/dates-and-times" I get date:dateTime(), but that only goes to seconds accuracy.

Similarly, sc:formatdate(sc:isoNow(),'ss.ffff') also only goes to seconds accuracy.

The Sitecore “debug page” functionality will tell me how long it takes to run the entire XSLT, but it wont let me benchmark individual components of the XSLT.

Is there any way to do this?

  • 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-28T00:54:12+00:00Added an answer on May 28, 2026 at 12:54 am

    The Sitecore “debug page” functionality will tell me how long it takes
    to run the entire XSLT, but it wont let me benchmark individual
    components of the XSLT.

    Is there any way to do this?

    This strongly depends on the XSLT processor you are using, and the results generally maynot be trustworthy.

    Even if you write your own extension functions and call them from the XSLT code (which seems to be the only way to achieve the desired timing precision), nothing guarantees that the extension function would be called when expected. or that it won’t be called more than once when one call is expected. This is because we cannot predict and anticipate the decision of the optimizer used by a particular XSLT processor.

    Some XSLT processors implement lazy evaluation — an expression isn’t evaluated unless it has become absolutely necessary for producing the result. Such a processor would execute the call to the timing extension function only when its result is used — and that may be at the end of the measured processing — so in this case any measured processing would be “instantaneous”.

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

Sidebar

Related Questions

I have XSLT 1.0 code like this: <xsl:key name=enemyItems match=metadata[attributes/metadata_key/@value = 'enemylist'] use=attributes/metadata_refkey/@value/> <xsl:template
I have this XSLT to create rows according to position in for-each: <xsl:for-each select=Campaign>
I have some XSLT that gets rendered in the Sitecore 6 CMS, but I
I have XSLT 1.0 like this: <?xml version=1.0?> <xsl:stylesheet xmlns:xsl=http://www.w3.org/1999/XSL/Transform version=1.0> <xsl:template match=paragraph> <p>
I have an XSLT like below, and want to use apply-templates inside the xsl:for-each
I have an XSLT 1.0 stylesheet running using the XSL processor included with PHP
I have XSLT like: <xsl:stylesheet version=2.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform xmlns:fo=http://www.w3.org/1999/XSL/Format xmlns:xs=http://www.w3.org/2001/XMLSchema xmlns:fn=http://www.w3.org/2005/xpath-functions> ....... <xsl:value-of select=format-number(abs(QUANTITY), '#')/>
Hi I have xslt structure shown below <xsl:template name=ConvertCriticalFlags> <xsl:param name=src1/> <xsl:param name=src2/> <xsl:param
I have this XSLT 2.0: <xsl:stylesheet version=2.0 xmlns:xsl=http://www.w3.org/1999/XSL/Transform> <xsl:output indent=yes/> <xsl:strip-space elements=*/> <xsl:template match=node()|@*>
I have a .xslt that translates xml from one form to another (I'm not

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.