Skip to content

Streaming performance: kotlinx-io & Okio integrations #2743

Open
@qwwdfsad

Description

@qwwdfsad

See #2742 for the benchmarks.

Currently, decoding from the buffered source using kotlinx-serialization is unreasonably slow compared to Moshi.

One of the reasons is that we do not leverage select API that potentially requires #2240 to be implemented first.

But even with this API out of the equation, we still have a single bottle-neck -- byte-by-byte codepoint reading (see the profile attached), and that definitely can be more straightforward and efficient (e.g. using raw access to the underlying segments).

image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions