Skip to content

Support ChunkedDecoder to read big xml data chunked #132

Open

Description

@Bodo1981

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.

Kotlin/kotlinx.serialization#2012

At the moment it is only supported by the JsonDecoder. Are there any plans to support this also in your XML Serialization Library?

Activity

  1. pdvrieze commented on Apr 6, 2023

    @pdvrieze
    Owner

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

  2. slavonnet commented on Sep 13, 2023

    @slavonnet

    kotlin have buffered streams . its sane but better )

  3. pdvrieze commented on May 15, 2025

    @pdvrieze
    Owner

    At this point changing the parser to support a push model on text reading (needed for chunked text at that level) is not a priority. Only the existing partial solution is kept.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions