Question: how to trace slow UI in a XAML app (e.g. Windows Terminal)
See original GitHub issueI have slow reaction (up to 5 seconds) reaction of New Tab buttons in Windows Terminal (context menu takes a few seconds to appear; new tab button freezes for a few seconds before even a new tab is created). I reported the issue in WT repo: https://github.com/microsoft/terminal/issues/6409
I asked how to enable tracing of WT UI handling. I was directed by @zadjii-msft to ask this question in this repo, and @zadjii-msft strongly suggested that the slowness comes not from WT code but from XAML framework itself.
Are there generic ways to trace what is happening? (e.g. what events are emitted and how long do their handling takes). I have zero context about how WT uses XAML or what it does on handling the button clicks. Unfortunately, I don’t have experience with using perf.exe
or Event Tracing, but I’ll be happy to try any instructions you suggest.
My system has about 80% of used physical memory and HDD (it’s a L470 lenovo laptop).
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:21 (6 by maintainers)
Top GitHub Comments
IMO It would probably just get punted back to the experts over here, or to Kenny over in microsoft/xlang / microsoft/cppwinrt, but I doubt the language itself is at fault here - I’d imagine that those libraries are getting regardless if XAML is being used via c++/winrt, c#, rust, cxx, or whatever other language the xlang team adds WinRT support to next.
For the record, the Terminal team is plenty accustomed to using those tools, we’ve just focused our efforts primarily on CPU performance, because the memory impact of the actual terminal bits of the Terminal is pretty minimal. We’ve kicked this thread over to the WinUI repo because the people who are best equipped to analyze the memory impact of WinUI are the people who own WinUI.