Subject: RE: [xsl] xsl:import performance problems From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Tue, 29 Jan 2008 16:13:41 -0000 |
If two modules A and B each import a module C, then it's the same as if they imported two modules C1 and C2 that happen to have identical content. You're going to end up with a lot of components (templates, variables etc) existing more than once with different import precedences. Doesn't sound like a good idea. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: Ronan Klyne [mailto:ronan.klyne@xxxxxxxxxxx] > Sent: 29 January 2008 16:01 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: [xsl] xsl:import performance problems > > Hello all, > > I have recently found that a particular pattern of imports > causes my stylesheet to take a very long time to compile. I > really wasn't expecting this to happen, and now I hope that > someone can explain to me what is happening... > > I have a set of 20 xsl files, with an extra 'master' xsl file > which imports the other files. This works and performs well. > > I ran into problems when I changed this arrangement. In an > attempt to break up the set of files so that I could re-use > small parts of them elsewhere, I added an import statement to > each file so that each imported the files it depended upon. > This works out at an average of 3 imports per file, with one > particular file being imported in almost every other. > > When I did this, it went from taking 2 seconds to compile to > 20 seconds (measured using Saxon's -t switch). > I can't for the life of me work out why this change would > cause such a drastic slowdown. Does anyone have any thoughts > or advice on the matter? > > I am using Saxon 6 on Java 1.6, btw. > > Ronan > > -- > Ronan Klyne > Business Collaborator Developer > Tel: +44 01189 028518 > ronan.klyne@xxxxxxxxxxx > www.groupbc.com
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] xsl:import performance proble, Ronan Klyne | Thread | Re: [xsl] xsl:import performance pr, Ronan Klyne |
[xsl] xsl:import performance proble, Ronan Klyne | Date | [xsl] transforming xml with namespa, Terry Ofner |
Month |