microsoft/Terminal

vim slower to open/close in conhost v2 compared to v1

Open

#3950 aperta il 13 dic 2019

Vedi su GitHub
 (3 commenti) (0 reazioni) (0 assegnatari)C++ (3212 fork)batch import
Area-PerformanceHelp WantedIssue-TaskNeeds-ReproProduct-Conhost

Metriche repository

Star
 (35.764 star)
Metriche merge PR
 (Merge medio 27g 19h) (24 PR mergiate in 30 g)

Descrizione

Environment

Windows build number: 17763
Windows Terminal version (if applicable): N/A, conhost only

Any other software? Vim for Windows, tested with 7.4-8.1

Steps to reproduce

Open a CMD window with a shortcut that specifies a large window buffer. The default in RS5 appears to be 9000, which is sufficient. Use the command line vim to open a random text file and observe startup time. Quit vim and observe exit time.

(Note that vim has a startup time debugging facility - run "vim --startuptime logfile filetoopen" and it will report the time spent in various phases of startup to the log file.)

Expected behavior

Expecting performance of open/close to be more in line with the legacy console. Note that the change to default to 9000 lines of history is also causal.

Actual behavior

Vim appears to take around a second or two to start and a second or two to exit, which appears to be saving and restoring the console screen buffer, when using conhost v2. This does not occur with v1, and can be mitigated by reducing the screen buffer size.

Guida contributor