[1.19+] Too many scrollbar marks slow down scrolling significantly #20465

Closed
opened 2026-01-31 07:14:40 +00:00 by claunia · 2 comments
Owner

Originally created by @DHowett on GitHub (Sep 11, 2023).

I think this is what's happening. Fill a buffer and then search for a really short needle like e.

Scroll.

It will be really unusually slow.

It gets better if the needle is longer.

Originally created by @DHowett on GitHub (Sep 11, 2023). I think this is what's happening. Fill a buffer and then search for a really short needle like `e`. Scroll. It will be really unusually slow. It gets better if the needle is longer.
Author
Owner

@DHowett commented on GitHub (Sep 11, 2023):

FWIW: The viewport has no bearing on what content exists for search :)

@DHowett commented on GitHub (Sep 11, 2023): FWIW: The viewport has no bearing on what content exists for search :)
Author
Owner

@lhecker commented on GitHub (Sep 13, 2023):

This doesn't happen due to searching the buffer again, but rather because WinUI struggles with the number of layers in the scrollbar canvas. I prototyped a solution based on my earlier bitmap proposal here: https://github.com/microsoft/terminal/compare/dev/lhecker/15955-optimize-scrollbar-marks
(It also includes a bug fix for ControlCore. The branch works but is still missing: A code cleanup, Shortening the canvas area by 16px on the top and bottom, The std::clamp code seems kinda bad)

@lhecker commented on GitHub (Sep 13, 2023): This doesn't happen due to searching the buffer again, but rather because WinUI struggles with the number of layers in the scrollbar canvas. I prototyped a solution based on my earlier bitmap proposal here: https://github.com/microsoft/terminal/compare/dev/lhecker/15955-optimize-scrollbar-marks (It also includes a bug fix for `ControlCore`. The branch works but is still missing: A code cleanup, Shortening the canvas area by 16px on the top and bottom, The `std::clamp` code seems kinda bad)
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#20465