Skip to content

Suggestion: Consider using StringBuilder pooling #506

@alexanderpino

Description

@alexanderpino

var stringBuilder = new StringBuilder();

Consider pooling StringBuilder instances (e.g., via ObjectPool) instead of creating a new one per call; re-use removes per-call allocations and virtually eliminates Gen-0 GC pressure.

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