Skip to content

Efficiency of Buffer::set_rich_text #301

@UkoeHB

Description

@UkoeHB

Currently Buffer::set_rich_text uses a lot of allocations, even when reconstructing a buffer. Ideally most or all of these allocations could be amortized using cached buffers and reusing allocations within the Buffer more aggressively. A full solution would require passing buffers and buffer sources to the method, so maybe a new method could be added for use-cases where full optimization is important (e.g. bevy).

As an aside, the Family::Name variant contains a String but it would make more sense as a SmolStr.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions