[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Optimization Question

Subject: Re: Optimization Question
From: omprakash.v@xxxxxxxxxxxxx
Date: Tue, 1 Feb 2005 08:59:40 +0530
Re:  Optimization Question
Hi,
    Have you tried XSLTC. This basically allows you to apply a compiled
form of your stylesheet in your transformations. Both xalan and saxon ship
with XSLT compilers. I would appreciate if you would let me know if you
decide to use XSLTC and if you had any success using it.

Regards,
Omprakash.V





                                                                                                                   
                    Tony Lavinio                                                                                   
                    <xml1@lavinio        To:     xsl-list@xxxxxxxxxxxxxxxxxxxxxx                                   
                    .net>                cc:     (bcc: omprakash.v/Polaris)                                        
                                         Subject:     Re:  Optimization Question                              
                    02/01/2005                                                                                     
                    07:12 AM                                                                                       
                    Please                                                                                         
                    respond to                                                                                     
                    xsl-list                                                                                       
                                                                                                                   
                                                                                                                   




There are a couple of XSLT profilers out there.  Stylus Studio, for
example, has one that hooks into the internal processor or Saxon or
Xalan-J.  It would tell you where the time is being spent.

See http://www.stylusstudio.com/xslt_profiler.html

The web page is a little out of date; the current version also added
Saxon 8 profiling, and the output includes cute little graphs.

In the profilers I've seen, including this one, the output format
itself is XML, letting you do some interesting transforms with the
profiling data.



On 01-31-2005 6:41 PM, Michael Nguyen wrote:

> All,
>    I've been trying to find a more efficient way of transforming a large
> group of files using Xalan.  I have about 435,000 xml documents (sizes
> ranging from 600b to 8K) that I need to transform.  Each document
> undergoes the same exact transformation.  Part of the transformation
> involves doing a lookup in another xml document. ( about 5mb)  The
> source xml files are stored in a hierarchical structure, such that the
> xml files are distributed across 40 directories.  If I perform the
> transofrmations without the external doc lookup, the entire process
> takes about two hours.  When I perform the transformation with the
> lookup it runs roughly 8000 documents / 12 hours.  I'm running this on a
> P4 3 Ghz system with 1GB ram. I'm using xsl:Key for lookup like the
> following:
>
> <xsl:key name="all-groups-key" match="GROUP_DOC/COVER_SHEET/TITLE"
> use="ancestor::GROUP_DOC/@CRG" />
> <xsl:variable name="all-groups"
> select="document('../current/groups.xml')//GROUP_DOC/COVER_SHEET/TITLE"
/>
>
> ... code ...snip
>    <xsl:template match="CC" >
>        <xsl:variable name="group_name" select ="." />
>        <xsl:variable name="crg" select="substring-after(.,'-')" />
>
>            <xsl:value-of select="$group_name"  />
>        <xsl:variable name="group_full_name"
> select="$all-groups[generate-id()
> = generate-id(key ('all-groups-key', $crg))]" />
>        <xsl:choose>
>            <xsl:when test="$group_full_name != ''" >
>            <a href="../../../group/{$crg}.html"><xsl:value-of
> select="$group_f
> ull_name"  /></a>
>            </xsl:when>
>            <xsl:otherwise>
>            <xsl:value-of select="$group_name"  />
>            </xsl:otherwise>
>        </xsl:choose>
>
>        <xsl:if test="following-sibling::CC" ><br /></xsl:if>
>    </xsl:template>
>
> ----------------------
> The lookup is done for each CC tag there are in the document.  Each
> document has at least one CC that matches.
> It seems to me that the difference in processing time is solely due to
> the lookup code above, because as soon as I remove it, all 435000 files
> are processed in relatively no time.  Once I put the code back in
> however it runs my machine to a grinding halt trying to process the
> files.  It seems to be loading the groups.xml file each time I perform
> the transformation. What I want to try to do is store this stylesheet
> with the lookup xml in memory to reduce the number of times the
> gorups.xml file is loaded.
> Thanks,
> Michael Nguyen






This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only. 
If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately.
You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification,
distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.

Visit Us at http://www.polaris.co.in

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.