Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support ChunkedDecoder to read big xml data chunked #132

Open
Bodo1981 opened this issue Apr 4, 2023 · 2 comments
Open

Support ChunkedDecoder to read big xml data chunked #132

Bodo1981 opened this issue Apr 4, 2023 · 2 comments

Comments

@Bodo1981
Copy link

Bodo1981 commented Apr 4, 2023

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?

@pdvrieze
Copy link
Owner

pdvrieze commented Apr 6, 2023

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

@slavonnet
Copy link

kotlin have buffered streams . its sane but better )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants