xsl-list
[Top] [All Lists]

Re: How to get timing information with 4xslt(4Suite)? (Was: Re: Re: Announcement: FXSL version 1.2)

2003-06-16 14:05:19
Dimitre Novatchev wrote:
Thank you once again. I just installed 4Suite and ran 4xslt.

Seems a nice and very fast XSLT processor.

It's not bad, and it's (IMHO) the ideal XSLT processor for python users, at
least those who don't want to use something like Pyana (a wrapper for Xalan).

We have XPath optimizations pending that will bring us back up to Saxon's
speed, or better, based on some preliminary tests with DocBook. Right now,
we're faster than Saxon only if you use JDK 1.1 :)

For now, we are still working toward conformance... better to be 99.9% correct
and somewhat slow (but not so slow as to be impractical) than super fast yet
wrong. After the 1.0 release we'll look for other bottlenecks and optimize
them in C. The known bugs in XPath/XSLT processing are all pretty minor:
http://4suite.org/docs/KNOWN_BUGS.txt

Re: the name of the processor, call it 4Suite, or 4xslt, it doesn't matter.
The XSLT processing library in 4Suite is called 4XSLT, and the command-line
script that provides an interface to that library is 4xslt. 4Suite has various
other libraries and features that don't necessarily have anything to do with
XSLT, but can integrate with it where necessary (e.g. RDF and XML document
repository related extension functions and elements).

Is there any command-line option
or any other way to obtain the time spent on the transformation?

There's none currently, but it is easy to add a "--time" option. Here is a
patch for Ft/Xml/Xslt/_4xslt.py. Apply it to the source and then re-run
'setup.py install'.

12c12
< import re, os, sys, traceback, cPickle
---
import re, os, sys, traceback, cPickle, time
49a50
    checktime = options.has_key('time')
142a144,145
      if checktime:
            start = time.time()
144a148,149
        if checktime:
            end = time.time()
168a174,175
        if checktime:
            print "Transformation time: %0.3fs" % (end - start)
235a243,246
                                                         ),
                                          Options.Option(None,
                                                         'time',
                                                         'Display the elapsed 
transformation time on stderr.'


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list