-
Notifications
You must be signed in to change notification settings - Fork 9.1k
Description
Ported from internal issue.
Repro Steps:
APIs that need to be further diagnosed by severity:
ReadConsoleOutputString - 24ms legacy, 442ms modern
FillConsoleOutput - 15ms legacy, 293ms modern
ReadConsoleOutput - 15ms legacy, 122ms modern
Maybe?
SetConsoleScreenBufferSize - 3ms legacy, 51ms modern
conhost.exe module is stamped 10.0.18345.1 which is one of the 19h1_release candidate builds.
Discussion:
@miniksa on Feb 26:
It appears that ConEmu is bulk reading a massive amount of state from the existing console host session before allowing things to proceed, probably synchronizing itself with the window it's wrapping.
We appear to have made that bulk read worse in recent days. We should institute performance tests with our new perf framework for these APIs and then work to optimize them back down
@miniksa on Mar 1:
OK. I've made a performance test for ReadConsoleOutputAttribute.
For v2 console, reading 9999 lines of ReadConsoleOutputAttribute appears to take ~3900ms.
For v1 console, the same takes ~300ms.
The goal now is to bring the time down.
@miniksa on Mar 1:
Sorry, that's a bad comparison. I was using debug code for v2.
This is release code comparison:
V2: ~400ms
V1: ~300ms
That's not that bad...
@miniksa on Mar 1:
OK I investigated the actual buffer dimensions and parameters used by ConEmu (81 wide x 32766 tall buffer) and reading 99 rows at a time worth of attribute data.
The new metrics for the closer matching test are:
v1 = 20-50ms
v2 = 130-170ms
@miniksa on Mar 1:
I made one for FillConsoleOutputAttribute too. Same dimensions.
v1 is 20-40ms
v2 is 120msish
@miniksa on Mar 1:
Added a third and final test for ReadConsoleOutputW and it seems to just straight up match the v1 perf.