Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows Terminal seems 30x times slower than mintty/wsltty #5963

Closed
skywind3000 opened this issue May 18, 2020 · 5 comments
Closed

Windows Terminal seems 30x times slower than mintty/wsltty #5963

skywind3000 opened this issue May 18, 2020 · 5 comments
Labels
Area-Performance Performance-related issue Product-Conhost For issues in the Console codebase Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.

Comments

@skywind3000
Copy link

Environment

Windows: 
Platform ServicePack Version      VersionString
-------- ----------- -------      -------------
 Win32NT             10.0.18363.0 Microsoft Windows NT 10.0.18363.0

WSL: Debian10

Steps to reproduce

  1. start wsl in Windows Terminal
  2. run: time for i in {1..5000}; do echo "line $i"; done
  3. start wsl in wsltty.
  4. run: time for i in {1..5000}; do echo "line $i"; done
  5. compare the real time result.

Expected behavior

According to the roadmap:

图片

Terminal shall be fast and efficient. Input latency should be eliminated wherever possible. Terminal will be very memory-efficient, and will avoid utilizing unnecessary dependencies to minimize memory consumption and disk footprint

Performance is supposed to be in the first place in the roadmap. And Windows Terminal should, at least, not be slower many times than mintty/wsltty before 1.0 release.

Actual behavior

  • Windows Terminal:
$ time for i in {1..5000}; do echo "line $i"; done
line 1
line 2 
line 3
...
line 5000

real    0m0.935s
user    0m0.047s
sys     0m0.125s 

screenshot:

图片

It requires almost one second to output 5000 lines.

  • wsltty:
$ time for i in {1..5000}; do echo "line $i"; done
line 1
line 2 
line 3
...
line 5000

real    0m0.034s
user    0m0.016s
sys     0m0.016s

screenshot:

图片

wsltty uses mintty as the backend, which requires only 0.034s to output 5000 lines.

Conclusion

Windows Terminal may have the lowest responsive time, but the throughput is really poor, almost 30x times slower than mintty/wsltty.

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels May 18, 2020
@zadjii-msft
Copy link
Member

So, the more useful comparison might be Windows Terminal vs the vintage console host, where the Terminal is nearly 7x faster:
image

This might be part of a discussion @miniksa and I were having....

@zadjii-msft zadjii-msft added Area-Performance Performance-related issue Product-Conhost For issues in the Console codebase labels May 18, 2020
@miniksa
Copy link
Member

miniksa commented May 18, 2020

This might be part of a discussion @miniksa and I were having....

Yes, it's probably the overhead of the console driver and/or we need to do wait chain analysis on it.

Our goal for 1.0 was to be faster than the original conhost while using the Windows Console driver. I'm not surprised that using a customized PuTTY talking directly to the TTY streams from the *nix environment is faster given it doesn't use any of the console system.

Long term, we want to get parity with this.

@kasper93
Copy link
Contributor

For me WT is actually slower, 9s vs 5s on con. Anyway I think this is dup of #4129

@miniksa
Copy link
Member

miniksa commented May 18, 2020

/dup #3075

@ghost
Copy link

ghost commented May 18, 2020

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

@ghost ghost closed this as completed May 18, 2020
@ghost ghost added Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing. and removed Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels May 18, 2020
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Performance Performance-related issue Product-Conhost For issues in the Console codebase Resolution-Duplicate There's another issue on the tracker that's pretty much the same thing.
Projects
None yet
Development

No branches or pull requests

4 participants