RS5 horrible performance regression in ScrollConsoleScreenBuffer API. #409

Open
opened 2026-01-30 21:51:12 +00:00 by claunia · 0 comments
Owner

Originally created by @awson on GitHub (Oct 11, 2018).

Originally assigned to: @miniksa on GitHub.

  • Windows build number: 10.0.17763.1

The description below refers to x64 versions of OS and application.

Repro:
Install Far Manager and set "Height" in "Screen Buffer Size" to 9999 for it. Then try to run anything, e.g. dir in it's command line. There will be almost a second pause before and after dir runs.

The cuplrit is this call of ScrollConsoleScreenBuffer function.

In my particular case the ScrollRectangle is set to {0,0,170,9938}, ClipRectangle is null ptr and DestinationOrigin is set to {0,-1}. This single call lasts almost a second.

Legacy mode does not have this problem.

Also my impression is that this API was already rather slow even before RS5, but not so much horribly slow.

Originally created by @awson on GitHub (Oct 11, 2018). Originally assigned to: @miniksa on GitHub. * Windows build number: 10.0.17763.1 The description below refers to x64 versions of OS and application. Repro: Install [Far Manager ](https://farmanager.com/download.php?l=en) and set "Height" in "Screen Buffer Size" to 9999 for it. Then try to run anything, e.g. `dir` in it's command line. There will be almost a second pause before and after `dir` runs. The cuplrit is [this call](https://github.com/FarGroup/FarManager/blob/8fb8e1f0caa83433c6f731ae9a3082a38d8e9b12/far/console.cpp#L850) of `ScrollConsoleScreenBuffer` function. In my particular case the `ScrollRectangle` is set to `{0,0,170,9938}`, `ClipRectangle` is null ptr and `DestinationOrigin` is set to `{0,-1}`. This single call lasts almost a second. **Legacy mode does not have this problem.** Also my impression is that this API was already rather slow even before RS5, but not so much **horribly** slow.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#409