You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Possible solution: if ProfileUtilities/FHIRPathEngine object is be re-used from StructureMapUtilities, the transform is substantially faster, especially for larger input data:
# Elements
Time [s]
Time with Workaround [s] Skip numberChildren #1699
hapifhir#1703 FML transform create heavyweight
FHIRPathEngine objects for every new Property. Re-use existing
ProfileUtilities/FHIRPathEngine objects from StructureMapUtilities.
hapifhir#1703 FML transform create heavyweight
FHIRPathEngine objects for every new Property. Re-use existing
ProfileUtilities/FHIRPathEngine objects from StructureMapUtilities.
mrunibe
added a commit
to mrunibe/org.hl7.fhir.core
that referenced
this issue
Nov 2, 2024
hapifhir#1703 FML transform create heavyweight
FHIRPathEngine objects for every new Property. Re-use existing
ProfileUtilities/FHIRPathEngine objects from StructureMapUtilities.
When using FML transform with large input/output data, a lot of runtime is spent in creating new Properties. Looks like this is caused by:
TransformSupportServices.createType()
org.hl7.fhir.core/org.hl7.fhir.validation/src/main/java/org/hl7/fhir/validation/TransformSupportServices.java
Lines 37 to 40 in 1ad319e
new ProfileUtilities
is instantiated:org.hl7.fhir.core/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/Property.java
Lines 89 to 91 in 1ad319e
FHIRPathEngine
object is created:org.hl7.fhir.core/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/conformance/profile/ProfileUtilities.java
Lines 458 to 460 in 1ad319e
Possible solution: if ProfileUtilities/FHIRPathEngine object is be re-used from StructureMapUtilities, the transform is substantially faster, especially for larger input data:
Skip numberChildren #1699
Re-use FHIRPathEngine mrunibe@0c62b94
It also significantly reduces the memory footprint (case with 200'000 elements now runs with 3.5gb heap, before required ~7gb).
The issue/numbers can be reproduced with the attached testcase.zip:
java org.hl7.fhir.validation.ValidatorCli testcase/bundle-200000.json -transform http://test.ch/DummyBundleToBundle -version 4.0 -ig testcase/map -output result-200000.json
CC @oliveregger
The text was updated successfully, but these errors were encountered: