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

Rendering slows down under load #1311

Closed
MSFTFox opened this issue Jun 19, 2019 · 7 comments
Closed

Rendering slows down under load #1311

MSFTFox opened this issue Jun 19, 2019 · 7 comments
Assignees
Labels
Area-Performance Performance-related issue Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@MSFTFox
Copy link
Member

MSFTFox commented Jun 19, 2019

Environment

Windows build number: Microsoft Windows [Version 10.0.18922.1000]

Steps to reproduce

When working under load, (was building an Android project at the time), I had a second tab open trying to copy/paste or type git commands.

Expected behavior

One tab shouldn't affect another. Rendering on the new tab was error prone with strange behavior at times.

Performing the same actions in a separately opened PowerShell or command prompt window performed as expected with little to no input latency.

Actual behavior

Each character from the pasted text appeared individually, one after another with a noticeable pause in between. Typing regular characters seemed to print out an incorrect character at times which was overwritten moments later by the correct one. At other times, the current line would re-render to the right of the cursor just to be overwritten as the cursor progressed.

@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 Jun 19, 2019
@zadjii-msft
Copy link
Member

Could you share what commandline applications you were running that caused this apparent lag? What shell were you pasting into (powershell, cmd, wsl)?

Were you you using a "debug" or a "release" build?

To me, this almost sounds like conpty lag more than terminal lag, but I'd need a more exact repro scenario to be able to investigate more.

@zadjii-msft zadjii-msft added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Jun 19, 2019
@MSFTFox
Copy link
Member Author

MSFTFox commented Jun 19, 2019

I had two PowerShell tabs open. I was running a gradle android build in one tab and attempting to paste into the other. This should be a release build.

I thought it was regular lag as well, but the performance difference between a tabbed PowerShell window versus an entirely new window was too great.

@ghost ghost added Needs-Attention The core contributors need to come back around and look at this ASAP. and removed Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something labels Jun 19, 2019
@DHowett-MSFT DHowett-MSFT added Area-Performance Performance-related issue Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. and removed Needs-Attention The core contributors need to come back around and look at this ASAP. Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Jun 20, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Jun 20, 2019
@skyline75489
Copy link
Collaborator

As in #806 I've made cmatrix performace better than before, but the 'typing regular characters seemed to print out an incorrect character' behaviour is still there. Seems tabs are affecting each other in an unintended way. Will try to find out why.

@ocitrev
Copy link

ocitrev commented Feb 28, 2020

I wrote a little program to stress the CPU to help reproduce this bug: stress.cpp. If I simulate heavy load on the PC with this simple program, I can reproduce this issue 100% of the time.

Here is a screen grab comparing Terminal and Console. Left window is Windows Terminal (Preview) Version: 0.9.433.0. Right window is pwsh.exe's console.
Steps in the video:

  • start stress.exe in the upper pane,
  • Left click in lower pane to give focus
  • Right click in lower pane to paste long text
  • Left click on right console to give focus
  • Right click to paste same long text

input-delay

You can see that the Console is much faster that Terminal. I hit this problem often, especially when I do a full build on my large C++ application.

I also noted that increasing the priority on OpenConsole.exe or Terminal.exe does not improve the situation much. To my surprise I need to increase the priority of the shell application running in the terminal to reduce this lag when the PC is under heavy load.

@zadjii-msft
Copy link
Member

Hey so I was investigating both #3169 and #3827, which sound a lot like this issue, though both fail to explicitly mention the "High CPU" factor which was certainly helpful.

I was able to run your stress test application on both 0.10.781, and a 0.11 pre-release build that's got #5185 in it. Fortunately, it does seem like #5185 will fix this particular issue. I'm going to leave the others open waiting for feedback, but I'm gonna assume those will also just go away when 0.11 comes out.

Thanks for providing the great repro case :)

@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label Apr 15, 2020
@zadjii-msft zadjii-msft added Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. and removed Needs-Tag-Fix Doesn't match tag requirements labels Apr 15, 2020
@zadjii-msft zadjii-msft added this to the Terminal v1.0 milestone Apr 15, 2020
@miniksa miniksa reopened this Apr 15, 2020
@miniksa
Copy link
Member

miniksa commented Apr 15, 2020

Incremental rendering is getting unspooled for 1.0 because it's too close to ship and I can't land #5345 and the other bugs it introduces in time thanks to the coronavirus.

@miniksa miniksa added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting and removed Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. labels Apr 15, 2020
@miniksa miniksa removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Apr 15, 2020
@miniksa miniksa self-assigned this Apr 15, 2020
@DHowett-MSFT
Copy link
Contributor

Incremental rendering isn't being unspooled; we'll track this with #778.

@ghost ghost added the Needs-Tag-Fix Doesn't match tag requirements label Apr 16, 2020
@DHowett-MSFT DHowett-MSFT added the Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. label Apr 16, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Apr 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Performance Performance-related issue Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

No branches or pull requests

6 participants