Details
-
Improvement
-
Status: Open
-
Normal
-
Resolution: Unresolved
-
None
-
None
-
None
Description
The standard SnakeYaml Serializer requires a complete YAML Node hierarchy to be build to be serialized, as it needs to handle YAML alias/anchor references.
But for serializing (Module) Source definitions, or (later) direct JCR->YAML serialization, for which we do not need/support alias/anchor references, a streaming processing will be much more efficient as no (complete) intermediate YAML Node model needs to be created first.
And for serializing (large) content definitions or JCR trees this will be required to be scalable.
Therefore we should create a new StreamingSerializer, replacing the SnakeYaml Serializer, which can serialize 'lightweight' Node objects on the fly by generating (SnakeYaml) Emitter events.
The current SourceSerializer and RepoConfigSerializer then should be refactored to use this 'event' driven streaming serialization instead.