[
https://issues.apache.org/jira/browse/JCRVLT-831?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18051286#comment-18051286
]
Julian Reschke commented on JCRVLT-831:
---------------------------------------
Turns out that this assumed that having the namespaces collected while the
content is traversed was correct. However the prefixes are (currently) needed
when writing the XML root element (this is an optimization needed to collect
all prefixes in one place).
>From an XML point of view, it would be "good enough" to serialize
>hierachically, but (a) that would increase the output size, and (b) it does
>not really make sense as in JCR, namespace mappings are global anyway.
A simple approach that avoids traversing the content to collect prefixes would
be to just serialize the whole registry (how big can it be? famous last words).
If we insist on minimal XML noise, there doesn't seem to be an alternative to
walking the tree twice. We can optimize the prefix collection walk, though.
That'll though a bit more work.
At the end of the day, we need more test coverage; otherwise we wouldn't be in
the place in which we are right now.
> For collection of namespace prefixes, avoid iterating over sibling nodes not
> contained in the filter(s)
> -------------------------------------------------------------------------------------------------------
>
> Key: JCRVLT-831
> URL: https://issues.apache.org/jira/browse/JCRVLT-831
> Project: Jackrabbit FileVault
> Issue Type: Improvement
> Components: vlt
> Reporter: Julian Reschke
> Assignee: Julian Reschke
> Priority: Major
> Fix For: 4.2.0
>
>
> It appears that the changes for JCRVLT-789 improved the performance for
> exporting the *content*, however the phase of collecting namespace prefixes
> does not use that optimzation.
> (TBD: write a test)
--
This message was sent by Atlassian Jira
(v8.20.10#820010)