xsl-list
[Top] [All Lists]

RE: anyway obvious way to speed this tranfrom up?

2004-01-02 14:34:56
-----Original Message-----
From: owner-xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com 
[mailto:owner-xsl-
list(_at_)lists(_dot_)mulberrytech(_dot_)com] On Behalf Of Ragulf Pickaxe
Sent: Wednesday, December 31, 2003 12:05 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] anyway obvious way to speed this tranfrom up?

Hello Ray,

You say that the xsl is generated by a program. If you have no way to
change this ...

i wrote the program that generates the xslt, so I can change it easily. we
are newbies to xslt and the boss wanted something that looked
straightforward (from a biz point of view I guess).
 

It seems that you throw a _lot_ of parameters between called templates.

The example is quite large, but from a quick glance at it, I would split
each of the templates generateOutputRecord and addNewFields in two.
Perhaps
some of the other templates too.

I need all the parameters in the template that is called by the one that is
called first. What does splitting it up do for me?


In the first condition "name=/inputDocument/header/name[4]" I would call
generateOutputRecord1 which would call addNewFields1 while in the second
condition "name=/inputDocument/header/name[5]" I would call
generateOutputRecord2 which would then call addNewFields2.


the parameters that are called namei are constant and could be hard coded I
suppose. 

As the values of the parameters are hardcoded, and only dependent on the
two
conditions, you would now not need to throw all these parameters at each
call. If you want, you can create global variables at the top of the xsl
document to hold the values.

I could use those for the constants or maybe pass them in as arguments to
the transform.

Thank you for your assistance!


From: "Ray Tayek" <rtayek(_at_)freightgate(_dot_)com>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject: [xsl] anyway obvious way to speed this tranfrom up?
Date: Tue, 30 Dec 2003 11:40:51 -0800

hi, newbie managed to get something to work, but it's *real* slow.

the xslt's are generated by a program, so they can not be hand tuned, but
maybe there is a way to do some things faster?

The xml input comes from a spreadsheet via a .csv file, so the original
names in the <header> can contains spaces and strange characters, but the
names in the <cell>'s are legal database names. ...


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



<Prev in Thread] Current Thread [Next in Thread>