Subject: Re: [xsl] Seek ways to make my streaming XSLT code run faster (My streaming XSLT program has been running 12 hours and is only a quarter of the way to completion) From: "Liam R. E. Quin liam@xxxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Sat, 9 Aug 2025 23:32:18 -0000 |
On Sat, 2025-08-09 at 23:00 +0000, Liam R. E. Quin liam@xxxxxxxxxxxxxxxx wrote: > On Sat, 2025-08-09 at 22:25 +0000, Roger L Costello > costello@xxxxxxxxxx > > > > I want to iterate over all 1900 identifiers and for each of them, > > iterate over all 5 million records to see which records contain the > > identifier. There is a loop within a loop: > > > > For each 1900 identifiers do > > B B B For each 5 million records do > > B B B B B B B B Check record against identifier > > Outside streaming, you could > apply-templates select="/records/record" > and then have a template > B B B match="VOR_identifier[ancestor::record[ > B B B B B not(Airport_SID_Primary_Records) > B B B ] > > and then process the record in a different mode? to be clear you can't do that in streaming mode. If the document is too large and you need to stream, you could have a template to match record, and take a grounded snapshot of it, and process that in a different (non-streaming) mode. Any time you start thinking in terms of loops i think itbs time to take a step back, especially in streaming, and ask if you can use template match expressions to do more of the work, and also whether you can work back from the result a bit more. > > Otherwise yes, XQuery. > -- Liam Quin,B https://www.delightfulcomputing.com/ Available for XML/Document/Information Architecture/XSLT/ XSL/XQuery/Web/Text Processing/A11Y training, work & consulting. Barefoot Web-slave, antique illustrations: B http://www.fromoldbooks.org
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Seek ways to make my stre, Liam R. E. Quin liam | Thread | Re: [xsl] Seek ways to make my stre, Wendell Piez wapiez@ |
Re: [xsl] Seek ways to make my stre, Liam R. E. Quin liam | Date | Re: [xsl] Seek ways to make my stre, Wendell Piez wapiez@ |
Month |