Project

Profile

Help

Bug #4302

closed

High memory usage with Saxon/C + PHP

Added by Alf Eaton over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Normal
Category:
JET
Start date:
2019-08-27
Due date:
% Done:

100%

Estimated time:
Found in version:
1.1.2
Fixed in version:
1.2.0
Platforms:

Description

I'm using a large XSL file (see attached, generated from Schematron rules) to process an XML file, and finding that the PHP extension is using 10x the amount of memory that Saxon uses to process the same file in Java.

When running the conversion with regular Saxon-HE on the command line, the memory usage of the Java process reaches 400MB and the processing takes ~20s.

When running the same conversion via Saxon-C as a PHP extension (using the patched catalog-aware files from https://saxonica.plan.io/issues/4274), the memory usage of the Apache instance reaches 4GB and the processing takes ~40s.

While there are obviously optimisations that can be made to the generated XSL to improve processing times, is it expected that the memory usage would be so much higher in the PHP extension?


Files

generated.xsl (1.27 MB) generated.xsl Alf Eaton, 2019-08-29 09:14
input.xml (234 KB) input.xml Alf Eaton, 2019-08-29 09:17

Please register to edit this issue

Also available in: Atom PDF