Project

Profile

Help

Bug #5925

open

Performance: XSL runs very slowly under Saxon-JS

Added by Mary Holstege 6 days ago. Updated 3 days ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
-
Sprint/Milestone:
-
Start date:
2023-03-17
Due date:
% Done:

0%

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

Description

This is a strange performance issue.

I have tried to boil this down, but when I do so, the performance problem evaporates so I'm afraid there is a huge wodge of code here, for which I apologize.

When I run this stylesheet in XSLT, it runs in a few seconds. This is a direct translation of some XQuery code, which also runs in seconds. In node (or a browser), however it takes over a minute. If I run the full set of tests it takes 11 hours to run instead of half a minute.

I ran some basic profiling: it seems to be killing itself with GC if I'm reading this right. (see profile20230317.txt)

The script go.sh is how I'm running this; obviously all the paths and whatnot would need fixing. It is Saxon 12.0 to do the export to JSON and then xslt3.js to run it.

Saxon-JS 2.5, Saxon 12.0


Files

20230317.zip (251 KB) 20230317.zip Zip file of code Mary Holstege, 2023-03-17 17:56
profile20230317.txt (16.8 KB) profile20230317.txt Profile Mary Holstege, 2023-03-17 18:01
Actions #1

Updated by Norm Tovey-Walsh 6 days ago

Thanks, Mary. I'll try to look at this next week.

Actions #2

Updated by Michael Kay 3 days ago

John Lumley points out that the example makes extensive use of packages. We may need to take a look at the SaxonJS code for binding cross-package component references (such as function calls), which has probably not been stress-tested.

Please register to edit this issue

Also available in: Atom PDF Tracking page