microsoft / microsoft/terminal

[Performance] Fast path for `RenderData::IsCursorDoubleWidth`

Open
#10,470 0 comments 0 reactions 0 assignees View on GitHub
Area-Performance Help Wanted Issue-Task Product-Conhost
Dominant language
C++
Stars
105k
Forks
9.6k
Avg merge
3d 17h
Merged PRs (30d)
29

Description

This is a sister issue of #10393.

Currently an unreasonable amount of CPU is wasted in checking `IsCursorDoubleWidth` in the buffer, due to the expensive construction of `TextBufferCellIterator`. I think it's fair to find a fast path for people who don't use width characters at all.

![image](https://user-images.githubusercontent.com/4710575/122703646-a757d780-d284-11eb-9f1a-689951091275.png)

Contributor guide

Open the contributing guide

Research direction

Start by locating RenderData::IsCursorDoubleWidth and the construction of TextBufferCellIterator mentioned in the issue. Trace how the buffer checks cursor width, then identify a fast path for users who do not use width characters. Done means the check avoids the expensive iterator construction in that case while preserving width-character behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
cli, desktop, performance
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.