From d90c6b3a07230d256a74943d01224e76c3773937 Mon Sep 17 00:00:00 2001 From: mrunibe Date: Mon, 29 Jul 2024 20:45:27 +0200 Subject: [PATCH] Perf tuning: skip numberChildren hapifhir#1699 defer numberChildren to end of transform --- .../src/main/java/org/hl7/fhir/r5/elementmodel/Element.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/Element.java b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/Element.java index ea0c5ebe8..ac39c439c 100644 --- a/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/Element.java +++ b/org.hl7.fhir.r5/src/main/java/org/hl7/fhir/r5/elementmodel/Element.java @@ -950,6 +950,8 @@ public class Element extends Base implements NamedItem { child.sort(); if (child.isEmpty()) remove.add(child); + else + child.numberChildren(); } children.removeAll(remove); children.sort(new ElementSortComparator(this, this.property));