Skip to content

Binary-search the two ellipsis truncation strips #88

Description

@zangjiucheng

renderContent truncates long text by stripping one character at a time and re-measuring, at main.ts:638 and :648.

This is a tail-latency cliff on repositories with long commit subjects or narrow columns — not a flat cost on every frame, and it should not be sold as one. A binary search over the cut point replaces a linear scan with a logarithmic one.

Gate the change on a before/after DEV HUD number measured on a repository that actually triggers it.

Sibling: #87 covers the deterministic hoists in the same function.


Found during v1.3.0 research: parallel codebase surveys, then each finding independently verified against the code before filing. Line numbers are from dev at the time of writing.

Metadata

Metadata

Assignees

No one assigned

    Labels

    performanceSpeed, memory, or startup cost

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions