Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: XSL really slow please help

From: "Neil Smith [MVP Digital Media]" <neil@------.--->
To: NULL
Date: 3/11/2009 10:31:00 PM
XSL is going to be working against a DOM, in your case of at least
10Gigs of in-memory objects, probably with a great deal of disk
swapping.

Your XSL looks pretty simple, and you might instead want to consider a
short program which uses XMLTextReader to built the result tree nodes
instead of loading your huge dataset into memory : I've heard it's
faster to do this serially than in one massive processing hit.

http://msdn.microsoft.com/en-us/library/system.xml.xmltextreader.aspx
http://saxon.wiki.sourceforge.net/CallingDotNet?f=print

Stuff like that might prompt responses indicate the benefits of memory
streams in processing large datasets <g>

HTH
Cheers - Neil

On Wed, 11 Mar 2009 10:50:03 -0700 (PDT), dba <bryanmurtha@g...>
wrote:

>Hello All,
>
>    I'm pumping about 10 gigs of data through this xsl-t of property
>listings. I'm just applying the XSL to a DataSet, however this takes
>almost an hour. I'm thinking I need to optimize my xsl but I'm not
>sure how, I've been googling and trying to make heads or tails but am
>stuck:
>
><xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>version="1.0">
>
><xsl:template match="NewDataSet">
> <properties>
>             <xsl:apply-templates select="Table"/>
> </properties>
></xsl:template>
>
><xsl:template match="Table">
>
>  <property>
>   <location>
>    <unit-number><xsl:value-of select="unit-number"/></unit-number>
>    <street><xsl:value-of select="street"/></street>
>    <city-name><xsl:value-of select="city-name"/></city-name>
>    <zipcode><xsl:value-of select="zipcode"/></zipcode>
>    <longitude><xsl:value-of select="longitude"/></longitude>
>    <latitude><xsl:value-of select="latitude"/></latitude>
>    <geocode-type><xsl:value-of select="geocode-type"/></geocode-
>type>
>    <display-address><xsl:value-of select="display-address"/></display-
>address>
>   </location>
>   <details>
>    <price><xsl:value-of select="price"/></price>
>    <year-built><xsl:value-of select="year-built"/></year-built>
>    <num-bedrooms><xsl:value-of select="num-bedrooms"/></num-
>bedrooms>
>    <num-bathrooms><xsl:value-of select="num-bathrooms"/></num-
>bathrooms>
>    <num-rooms><xsl:value-of select="num-rooms"/></num-rooms>
>    <square-feet><xsl:value-of select="square-feet"/></square-feet>
>    <date-listed><xsl:value-of select="date-listed"/></date-listed>
>    <property-type><xsl:value-of select="property-type"/></property-
>type>
>    <description><![CDATA[<xsl:value-of select="description"/>]]></
>description>
>    <mlsId><xsl:value-of select="mlsId"/></mlsId>
>    <provider-listingid><xsl:value-of select="provider-listingid"/></
>provider-listingid>
>   </details>
>   <landing-page>
>    <lp-url><xsl:value-of select="lp-url"/></lp-url>
>    <virtual-tour-url><xsl:value-of select="virtual-tour-url"/></
>virtual-tour-url>
>   </landing-page>
>   <status><xsl:value-of select="status"/></status>
>   <site>
>    <site-url>http://www.broker.com</site-url>
>    <site-name>Broker.com</site-name>
>  </site>
>  <pictures>
>   <picture>
>    <picture-url><xsl:value-of select="picture-url"/></picture-url>
>   </picture>
>  </pictures>
>  <agent>
>   <agent-name><xsl:value-of select="agent-name"/></agent-name>
>   <agent-phone><xsl:value-of select="agent-phone"/></agent-phone>
>   <agent-email><xsl:value-of select="agent-email"/></agent-email>
>   <agent-picture-url><xsl:value-of select="agent-picture-url"/></
>agent-picture-url>
>  </agent>
>  <broker>
>   <broker-name>A Broker</broker-name>
>   <broker-phone>1.800.555.1212</broker-phone>
>   <broker-email>info@b...</broker-email>
>  </broker>
>  <open-home>
>   <period1-date><xsl:value-of select="period1-date"/></period1-date>
>   <period1-start-time><xsl:value-of select="period1-start-time"/></
>period1-start-time>
>   <period1-end-time><xsl:value-of select="period1-end-time"/></
>period1-end-time>
>   <period2-date><xsl:value-of select="period2-date"/></period2-date>
>   <period2-start-time><xsl:value-of select="period2-start-time"/></
>period2-start-time>
>   <period2-end-time><xsl:value-of select="period2-end-time"/></
>period2-end-time>
>  </open-home>
> </property>
>
></xsl:template>
>
></xsl:stylesheet>
------------------------------------------------
Digital Media MVP : 2004-2009
http://mvp.support.microsoft.com/mvpfaqs


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent