Project

Profile

Help

Support #5034

closed

Run multiple instances in parallel

Added by Anders Wasen over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2021-07-05
Due date:
% Done:

0%

Estimated time:
Applies to JS Branch:
Fix Committed on JS Branch:
Fixed in JS Release:
SEF Generated with:
Platforms:
Company:
-
Contact person:
-
Additional contact persons:
-

Description

I just found and started using the Saxon-JS to be able to run Schematron validations on Peppol (Peppol.eu) messages and it works great! I've "pre-compiled" the Schemat's needed into JSON (using schxslt and xslt3) and I am then executing the SaxonJS.transform() on the data.

As these stylesheets are fairly big it takes some time and performance is of key as it is run through a API.

I run the three calls in a Promise.all() and have added timers. From the timers I can see that the function calls happens in parallel but the execution of SaxonJS.transform() seems to be sequential, i.e. when the first SaxonJS.transform() returns the next starts... Is there some "queuing" or sequential code happening in SaxonJS that would prevent running it in parallel?


Files

saxon-js-test.zip (482 KB) saxon-js-test.zip Anders Wasen, 2021-07-05 17:31
Actions #1

Updated by Michael Kay over 3 years ago

I can't think of any obvious problem preventing this, but rather than setting up a test case from scratch and finding that we can't reproduce the problem, it would be great if you could simplify your scenario down to a simple test case that we can execute ourselves to demonstrate the problem (and ideally, add to our test suite).

Actions #2

Updated by Anders Wasen over 3 years ago

Yeah, I actually found the issue while I was putting together the sample code (attached) where I called a function as a constant which blocked the scope it seems...

Moving all code to an anonymous function seems to have done the trick!

I can provide the code anyhow as it might help someone else in the future!

Thanks for the quick response!

Actions #3

Updated by Debbie Lockett over 3 years ago

  • Status changed from New to Closed

Closing this support issue with nothing to fix, as the user has worked out for themselves how to resolve the problem by adjusting the script and the way SaxonJS.transform is called.

Please register to edit this issue

Also available in: Atom PDF Tracking page