[ https://issues.apache.org/jira/browse/OAK-11780?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Joerg Hoh resolved OAK-11780. ----------------------------- Resolution: Fixed > XML import: calculate prefixMap only when required > -------------------------------------------------- > > Key: OAK-11780 > URL: https://issues.apache.org/jira/browse/OAK-11780 > Project: Jackrabbit Oak > Issue Type: Improvement > Components: jcr > Affects Versions: 1.78.0, 1.80.0 > Reporter: Joerg Hoh > Assignee: Manfred Baedke > Priority: Major > > I was tracing an import of a long-running installation of a filevault package > and found that {{TargetImportHandler.createCurrentPrefixMap}} is invoked > whenever {{startPrefixMapping}} or {{endPrefixMapping}} is invoked. > Now I have in the > [ImportHandler.startElement|https://github.com/apache/jackrabbit-oak/blob/298ee403db0e1aa40368681e98ee17327bacdb1b/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/xml/ImportHandler.java#L174-L176] > TargetImportHandler.startPrefixMapping is invoked in a loop, but next to > adding the prefix also the {{currentPrefixMapping}} is calculated; which is > not required, as it is only used in > {{TargetImportHandler.currentNamePathMapper()}}, which is not called as part > of this loop. > For that reason the call to {{createCurrentPrefixMap}} should be moved into > the {{TargetImportHandler.currentNamePathMapper()}} and only executed when it > is actually needed. > In my tests this shows up in about 12% of the stacktraces I created during > the package import. -- This message was sent by Atlassian Jira (v8.20.10#820010)