[YANGTOOLS-758] yang-data-codec-xml: reuse codecs across documents Created: 14/Mar/17  Updated: 10/Apr/22  Resolved: 11/Apr/17

Status: Resolved
Project: yangtools
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug
Reporter: Robert Varga Assignee: Robert Varga
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Issue Links:
Blocks
blocks YANGTOOLS-766 yang-data-codec-gson: compressed inst... Resolved
is blocked by YANGTOOLS-759 yang-data-codec-gson: fix JSONCodecFa... Resolved
External issue ID: 7983

 Description   

XmlCodecFactory is making the mistake of caching the codecs based on the combination of NamespaceContext and TypeDefinition.

This means the codecs cannot be reused across documents, as these result in distinct NamespaceContext.

The XmlCodec interface already provides a writer, from which we can get the namespace context, hence it should be relatively easy to pass this down for the duration of the serialization request.



 Comments   
Comment by Robert Varga [ 24/Mar/17 ]

YANGTOOLS-759 provides the refactor of caching logic, which we will need to take advantage of in order to attain peak performance.

Comment by Robert Varga [ 27/Mar/17 ]

tip of master: https://git.opendaylight.org/gerrit/53870

Generated at Wed Feb 07 20:54:13 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.