Click to See Complete Forum and Search --> : timing of xml merge


fiddes_c
September 10th, 2003, 06:21 AM
hi,
I'm merging a very large xml file with xsl and would like to know if there's any command I can add to either which will tell me exactly it takes for the files to run against each other?
I checked w3.org specifications for xml and found nothing there.
cheers
Cormac
ps I know on windows explorer the time will be against the outputted file, but I may need to break down it's output to see where it's slowing down. It's being run against Perl --know nothing about this, though I have seen that this can be modified to check for CPU.

fiddes_c
September 10th, 2003, 06:27 AM
hi,
pps would it be a good idea to add some format time at beginning and end of outputted document?
<FileDetails>
<Author>Robert Brown</Author>
<Date dt:dt="datetime">2000-02-16T15:56:00</Date>
</FileDetails>
cheers
Cormac

erwin_78
September 11th, 2003, 03:20 AM
i would just advise you to see what's going on in the XSL and see if there are some PO killing queries like "\\SomeNode", that is a real pain in the .....

Just adding timestamps at the start and end won't help, you can do that in your perl script as well, which is probably more easy

Maybe it's an idea to just decrease the size of the xml after every test and see, where you start gaining performance.

fiddes_c
September 12th, 2003, 05:08 AM
hi,
thanks for your reply, it's probablt hinged around a sorting within the stylesheet and memory. I have the following sort criteria which has to be applied to the xml file.(unfortunately the data cannot be pre-sorted!). If it's only for a small xml file, it's fine, but once I hit a large falls it kill-joy for processing.
this is the sort...

cheers
Cormac
<xsl:template name="PRO_SORT">
<xsl:variable name="Dids">
<xsl:value-of select="string(START//Flag)"/>
</xsl:variable>
<xsl:choose>
<!-- When Flag = 1 then apply a sort by PNumber only
-->
<xsl:when test="$Dids=1">
<xsl:apply-templates select="G_MEM_DETAILS">
<xsl:sort select="number(PNumber/text())" order="ascending" data-type="number"/>
</xsl:apply-templates>
</xsl:when>

<!-- When Flag = 2 then apply a sort first by SNumber, then within SNumber by PNumber
-->

<xsl:when test="$Dids=2">
<xsl:apply-templates select="G_MEM_DETAILS">
<xsl:sort select="SNumber" order="ascending"/>
<xsl:sort select="number(PNumber/text())" order="ascending" data-type="number"/>
</xsl:apply-templates>
</xsl:when>

<!-- default is no sort
-->
<xsl:otherwise>
<xsl:apply-templates select="G_MEM_DETAILS"/>
</xsl:otherwise>

</xsl:choose>
</xsl:template>