microsoft / microsoft/terminal
AppHost::_updateTheme is called 8x during launch
- Dominant language
- C++
- Stars
- 105k
- Forks
- 9.6k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 29
Description
### Windows Terminal version
42e8de3
### Actual Behavior
This primarily happens due to `TerminalPage::_updateThemeColors` being called just as often. Once during `TerminalPage::Create`, but then again during `TerminalPage::WindowActivated` and `TerminalPage::_UpdatedSelectedTab` and then multiple times because the "BackgroundBrush" property changed, even though the actual color stayed constant during the entire time.
We should add one more more early returns in our event handlers, as far up the call chain as possible.
Contributor guide
Research direction
Trace AppHost::_updateTheme and TerminalPage::_updateThemeColors through TerminalPage::Create, WindowActivated, and _UpdatedSelectedTab, focusing on the BackgroundBrush change notifications during launch. Confirm where repeated calls can be skipped without changing the final theme, then verify that launch produces fewer updates while retaining the correct appearance.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100