[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Performance Loss by dateTime conversion?

Subject: RE: Performance Loss by dateTime conversion?
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 16 Mar 2007 23:43:07 -0000
RE:  Performance Loss by dateTime conversion?
> I have a performance issue concerning the conversion from C's 
> time_t (seconds since 00:00:00 GMT Jan. 1,
> 1970) to a date time string like CCYYMMDDHHMMSS.
> 
> I use EXSLT's Date library (add, duration, ...) to do this 
> conversion. It works, but the performance is very poor (e.g.: 
> 22 minutes for 3200 records).
> 
> XSLT is generated by Altova MapForce. 

Try either or both of:

(a) code it in XSLT 2.0

<xsl:variable name="epoch" select="xs:dateTime('1970-01-01T00:00:00Z')"/>
<xsl:variable name="milli" select="xs:dayTimeDuration('PT0.001S')"/>
<xsl:for-each ...
  <xsl:value-of select="format-dateTime(
     $epoch + $timestamp * $milli,
     '[Y0001][M01][D01][H01][M01][S01]')"/>

(b) run it with Saxon 8.9

My guess is if you do both then it will run in a few seconds.

Michael Kay
http://www.saxonica.com/

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.