Skip to content

Don't deserialize utf8 data as native strings in Rust backend #2538

@teh-cmc

Description

@teh-cmc

We currently do the obvious and slow thing: deserializing utf8arrays as native strings, which means a lot of copies, utf8 checks, etc.

We should instead keep raw Buffer<u8>s around and provide helpers to turn them into Cow<str> just in time, or something along these lines.

This of course extends to other types beyond strings; in fact it applies to any component with an inner type that is in and of itself plural: Binary, List<NativeT>, ...

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