xsl-list
[Top] [All Lists]

RE: [xsl] xsl:import performance problems

2008-01-29 09:14:26
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(_dot_)klyne(_at_)groupbc(_dot_)com] 
Sent: 29 January 2008 16:01
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
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(_dot_)klyne(_at_)groupbc(_dot_)com
www.groupbc.com

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

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