Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
Well, I hope I'm qualified to answer ;-)

1600 XSLT calls in one process is nothing. I know people using XML::LibXSLT in AxKit with MaxRequestsPerChild much higher than that, and no leaks. And it should take absolutely no time at all. Assuming your XML files are no larger than about 4KB, I would guess about 0.2 seconds per file to run (assuming you cache stylesheets), thus taking you in total about 5 minutes for the whole lot. I'm really not sure what you're concerned about.

Though maybe I've got your XSLT complexity way out of whack. I've seen some XSLT transforms take over a second once or twice (though it's rare). So you may be looking at about 25 minutes.

The key though for speed is to cache stylesheets.

One alternative, which I'm hoping Barrie Slaymaker will come on here and describe, is to use a SAX ByRecord machine to process the XML files directly using SAX, no 3 step approach like you've described - just a single simple one-liner.


In reply to Re: Mega XSLT Batch job - best approach? by Matts
in thread Mega XSLT Batch job - best approach? by ajt

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    Domain Nodelet?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others admiring the Monastery: (4)
    As of 2024-07-14 13:00 GMT
    Find Nodes?
      Voting Booth?

      No recent polls found

      erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.