Skip to content

Conpty: Additional ScrollFrame optimizations #5228

@zadjii-msft

Description

@zadjii-msft

In #5181, I changed XtermEngine::ScrollFrame to actually work.

Part of the trickiness with that function is that we need to make sure to emit newlines to scroll new lines into the terminal, but we also need to preserve linewrap state for lines that might have been split across paints.

  • If only the bottom line is invalid, don't manually emit a newline.
    • We need to manually emit newlines to make sure there's space at the bottom of the terminal's buffer. However, if only the bottom line is invalid, then we're going to emit a newline to get to the next line of the buffer anyways. We only need the newlines if there's other invalid regions in the buffer, because those regions will get painted (to the wrong place) before we newline to the new bottom line.
    • This includes "don't mark the last cell as invalid" for a wrapped line
  • Also discussed at this time: use a bitset to track which lines are new instead of the single _newBottomLine member. This is probably more correct for cases where multiple lines are getting scrolled in at a time.
  • conpty exhibits pathological performance on scrolling region redraw (repaints entire screen) #7019

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-RenderingText rendering, emoji, complex glyph & font-fallback issuesIn-PRThis issue has a related PRIssue-TaskIt's a feature request, but it doesn't really need a major design.Needs-Tag-FixDoesn't match tag requirementsPriority-2A description (P2)Product-ConptyFor console issues specifically related to conpty

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions