xmlutil
xmlutil copied to clipboard
Support ChunkedDecoder to read big xml data chunked
The latest release of kotlin serialization 1.5.0 added a new interace called ChunkedDecoder which support decoding large data with the help of okio in smaller chunks. This prevents OutOfMemory Exceptions and some performance improvements.
https://github.com/Kotlin/kotlinx.serialization/pull/2012
At the moment it is only supported by the JsonDecoder. Are there any plans to support this also in your XML Serialization Library?
There is "partial" support in the dev branch. This is partial in that it is supported by serialization but not supported in the parsers (yet). This means that the parser will provide whatever string/text size it does, and the serializer provides it in chunks. There is an implication in the parsing that strings are given contiguous, but this is not a hard requirement. If they chunk then chunked parsing will support that. I haven't put such functionality in the platform independent parser yet (and for DOM it makes no sense at all).
kotlin have buffered streams . its sane but better )