https://bugs.winehq.org/show_bug.cgi?id=56851
--- Comment #6 from Eric Pouech eric.pouech@gmail.com --- (In reply to Konstantin Isakov from comment #5)
when you talk about scrolling, it's about shifting content up when adding new lines at the bottom of the console?
I don't refer to cmd.exe, I refer to interactive Windows console programs, for example to FAR manager (https://appdb.winehq.org/objectManager.php?sClass=application&iId=953). You can use it as a text editor, viewer, you can browse files etc. By scrolling I mean continuously keeping the Up or Down buttons pressed and seeing the text on the screen to move up or down as a result.
My point is, Windows console subsystem isn't limited to just running .bat files with cmd.exe.
we could rather introduce a variable delay strategy:
Sure, but that would only help for short bursts of interactivity. When the burst sustains, you'd still have to decide what the sustained rate of updates should be. I'd still want that rate to be at least 60fps - even if the text scrolls fast and you can't read all of it, you can still see anomalies, like longer or empty lines, lines with different colors etc. Last but not least, there are simply aesthetical factors. I'd choose to spend 1% more of my CPU time (which is idling anyway) to get a more responsive console than to watch it stutter.
It'll always be a responsiveness vs throughput trade-off in the end, so I think the only sensible solution is to introduce an option to choose the desired FPS (with the possibility of choosing an arbitrary integer value, defaulting to 20, or disabling delaying updates entirely if one is so inclined). We already have options to choose font etc, it could live alongside it.
I don't like the idea to make it configurable. It looks like a too complicated feature for regular users. OTOH, current structure of conhost (ie single threaded with all requests to read/write console contents *AND* redisplaying in window mode) likely influenced the current design strategy. Perhaps having a dedicated thread for rendering console content might be an alternate design. Still need to measure the impact of synchronisation between the two threads, but that would make things easier in the long run. But that would a larger change.