Skip to content

Less string copying via views #49

Open
@Hawk777

Description

@Hawk777

Whenever a string is taken out of libxml2 and returned (for example in AttributeNode::get_value), it is copied into a ustring (aka string). It might be nice to have the option to avoid that memory allocation and copying by returning a view (std::string_view or even std::u8string_view) instead. Of course this would require the owner to handle lifetimes appropriately, but that’s expected when views are in use.

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