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 two XSLT variables as given below: <xsl:variable name=staticBaseUrl select='https://www.hello.com/htapi/PrintApp.asmx/getGames?contentId=id_sudoku&uniqueId=123456&pageformat=a4' /> <xsl:variable name=dynamicUrl
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
Lets say I have a xslt stylesheet like the following: <?xml version=1.0 encoding=utf-8?> <xsl:stylesheet
I have this XSLT: <xsl:strip-space elements=* /> <xsl:template match=math> <img class=math> <xsl:attribute name=src>http://latex.codecogs.com/gif.latex?<xsl:value-of select=text()
I have this XSLT to create rows according to position in for-each: <xsl:for-each select=Campaign>
I have few XSLT files, index stylesheet imports layout using xsl:import. VS says that
I have an XSLT 1.0 stylesheet running using the XSL processor included with PHP
I have an XSLT that is transformed to an XML using System.Xml.Xsl.XslCompiledTransform . The
I have a xslt stylesheet with multiple xsl:import s and I want to merge
I have an xslt sheet with some text similar to below: <xsl:text>I am some

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.