[Home] [By Thread] [By Date] [Recent Entries]

  • From: "Andrew Welch" <andrew.j.welch@g...>
  • To: "Boris Kolpackov" <boris@c...>
  • Date: Wed, 3 Dec 2008 11:01:40 +0000

Running the following transform against that file using Kernow's
performance testing facility:

<xsl:stylesheet version="2.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:xs="http://www.w3.org/2001/XMLSchema"
	xmlns:t="http://www.example.com/test"
	exclude-result-prefixes="xs t">

<xsl:param name="age" select="25" as="xs:integer"/>
<xsl:param name="gender" select="'female'" as="xs:string"/>

<xsl:template match="/">
	<xsl:for-each select="/t:people/person[@gender eq
$gender][xs:integer(@age) lt $age]">
		<xsl:value-of select="concat(string-join((@first, @last, @age), ',
'), '&#xa;')"/>
	</xsl:for-each>	
</xsl:template>


</xsl:stylesheet>


Gives this result:

Ran 5 times
Run 1: 445 ms
Run 2: 178 ms
Run 3: 216 ms
Run 4: 335 ms
Run 5: 163 ms
Ignoring first 2 times
Total Time (last 3 runs): 714 ms
Average Time (last 3 runs): 238 ms


That time includes writing the result to the output window.



2008/12/3 Andrew Welch <andrew.j.welch@g...>:
> Hi Boris,
>
>> Note how in the XQuery case I had to invent a delimiter (':') for
>> the first, last, and age fields so that I could pass them as a string
>> from XQuery to the programming language. I then had to manually parse
>> this string and convert the age field to unsigned short. To me, this
>> doesn't look easier than data binding at all.
>
> Surely you wouldn't return a delimited string, you would return person
> nodes and then select the values from the returned nodes?
>
> Also, the comparison isn't quite right - the only fair thing would be
> time how long it takes to output the information to a file or standard
> out (the gui language would likely be different in either case, say
> swing vs html)
>
>


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member