xmlutil icon indicating copy to clipboard operation
xmlutil copied to clipboard

Support ChunkedDecoder to read big xml data chunked

Open Bodo1981 opened this issue 2 years ago • 3 comments
trafficstars

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?

Bodo1981 avatar Apr 04 '23 19:04 Bodo1981

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).

pdvrieze avatar Apr 06 '23 09:04 pdvrieze

kotlin have buffered streams . its sane but better )

slavonnet avatar Sep 13 '23 23:09 slavonnet