[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|