Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FML transform performance - excessive creation of FHIRPathEngine in new Properties #1703

Open
mrunibe opened this issue Jul 26, 2024 · 0 comments
Labels

Comments

@mrunibe
Copy link

mrunibe commented Jul 26, 2024

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:

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
Time with Tuning [s]
Re-use FHIRPathEngine mrunibe@0c62b94
10 0.2 0.2 0.1
100 0.5 0.5 0.1
1'000 2 2 0.2
10'000 64 11 0.5
20'000 250 23 0.8
100'000 5316 126 2.4
200'000 - 240 3.6

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

mrunibe added a commit to mrunibe/org.hl7.fhir.core that referenced this issue Jul 26, 2024
hapifhir#1703 FML transform create heavyweight
FHIRPathEngine objects for every new Property. Re-use existing
ProfileUtilities/FHIRPathEngine objects from StructureMapUtilities.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants