Bug Report - WSL based text rendering lag
Environment
Windows build number: 18362.239
Windows Version: 1903
Windows Terminal version : 0.2.1831.0
Any other software?
Using WSL 1 with Ubuntu Distribution (just for info)
Steps to reproduce
This is the way I found it was most noticeable and also how I found it initially
- Open Terminal
- Open WSL Ubuntu using the options tab or type
wsl.exe -d Ubuntuin CMD or Powershell - Install cmatrix using
sudo apt install cmatrix - Type
cmatrixto run. - See the laging behavior of the terminal.
Optional Reproducible Behavior
- Now try to close the tab or application after running the cmatrix for a little while in full screen
- The application Crashes or becomes unresponsive
This can also be seen a little bit when installing small files where ### lagS out significantly in WSL although I haven't noticed a crash just while installing things which is already rare compared to running cmatrix
Expected behavior
There shouldn't be any kind of this behavior where text lags out very well compared to other terminals. And it should defenitly not become unresponsive if we try to close the tab while doing so.
Actual behavior
Right now in its current State the Terminal uses very high resources while doing cmatrix, which is about 30% CPU usage OR more (depending on the size of the terminal). Which is higher than the number I saw with older versions of Terminal about 20-ish
It visibly lags while doing normal tasks like installing a package or any task where lots of lines update quickly, which kind of frustrating. A little bit but still. In the case of crashing ** THE ENTIRE TERMINAL ** after trying to close the tab, I never did any serious task while executing "cmatrix" 😂😛 but that could end up very bad as the entire terminal crashes.
Here is one of multiple times it crashed.

Verifications
I have verified that its not my computer specific issue because cmatrix works like charm in other terminals like CMD, Powershell, Ubuntu Base Terminal, Hyper.
Correlating to that its not WSL issue because it works just fine on other terminals. This is also a fresh install of windows, so I don't expect there are any issues here, not that it should matter.
I've also seen some crashes on rendering special characters. Perhaps cmatrix is just a fancy way to make us render special characters?
I noticed that cmatrix runs slowly in Windows Terminal comparing to Alacritty.
Try the following command:
cmatrix -u0
In Alacritty I can get a smooth animation, but in Windows Terminal, the animation seems slow.
We believe this is #2375
Fwiw I can't reproduce the slowdown on the 1910 preview release. Cmatrix appear to run normally now.
@dkambersky Thanks for the feedback! 1910 preview does include performance enhancement that's intended to make cmatrix great again.
Largely, this issue should be fixed. With a higher resolution and smaller font, the rendering pressure will be higher. And the cmatrix lag will be more likely to appear. But overall CPU usage is significantly lower.
I'm going to close this one based off the excellent work @skyline75489 committed for 0.6, and other changes in that release that should have mitigated this crash. For any other persistent perf issues, I'll direct conversation to #1064.
Thanks all!