Project

Profile

Help

Bug #2431

closed

Saxon uses more memory than Xalan to transform W3C DOM to String

Added by Mateusz Nowakowski almost 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Performance
Sprint/Milestone:
-
Start date:
2015-07-31
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

Depending on input XML size Saxon allocates between 48-75% more memory to convert W3C Document to String.

Difference between case 1 and 2:

{code}

  1. W3C DOM -> String using Saxon allocated memory: 219432 bytes

  2. W3C DOM -> String using Xalan allocated memory: 145512 bytes

  3. Saxon NodeInfo -> String using Saxon allocated memory: 78448 bytes

  4. Wrapped W3C DOM from NodeInfo -> String using Saxon allocated memory: 78936 bytes

  5. Wrapped W3C DOM from NodeInfo -> String using Xalan allocated memory: 318392 bytes

{code}

See attached transformer-case.zip project (run mvn test to see the output, developed under Java7)

Fortunately Saxon is much better when Saxon DOM model is used, but problem is with libraries using Transformer API which starting behaving worse when Saxon appears on the classpath.


Files

transformer-case.zip (5.85 KB) transformer-case.zip Mateusz Nowakowski, 2015-07-31 14:06

Please register to edit this issue

Also available in: Atom PDF