[PR #15204] [MERGED] Avoid animations during startup #30503

Open
opened 2026-01-31 09:41:15 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/15204
Author: @lhecker
Created: 4/18/2023
Status: Merged
Merged: 4/20/2023
Merged by: @DHowett

Base: mainHead: dev/lhecker/startup-animations


📝 Commits (1)

  • bf8d0b5 Avoid animations during startup

📊 Changes

9 files changed (+235 additions, -169 deletions)

View changed files

📝 src/cascadia/TerminalApp/App.xaml (+18 -1)
📝 src/cascadia/TerminalApp/SettingsTab.cpp (+14 -12)
📝 src/cascadia/TerminalApp/SettingsTab.h (+1 -1)
📝 src/cascadia/TerminalApp/TabBase.cpp (+42 -48)
📝 src/cascadia/TerminalApp/TabBase.h (+1 -1)
📝 src/cascadia/TerminalApp/TerminalTab.cpp (+142 -96)
📝 src/cascadia/TerminalApp/TerminalTab.h (+7 -7)
📝 src/cascadia/TerminalControl/TermControl.cpp (+2 -2)
📝 src/cascadia/TerminalControl/TermControl.xaml (+8 -1)

📄 Description

This fixes 3 sources for animations:

  • TabView's EntranceThemeTransition causes tabs to slowly slide in
    from the bottom. Removing the transition requires you to override the
    entire list of transitions obviously, which is a global change. Nice.
    Am I glad I don't need to deal with the complexity of CSS. /s
  • TabBase, SettingsTab and TerminalTab where using a lot of
    coroutines with resume_foreground even though almost none of the
    functions are called from background tabs in the first place. This
    caused us to miss the initial XAML drawing pass, which resulted in
    animations when the tab icons would asynchronously pop into existence.
    It also appears as if resume_foreground, etc. have a very high CPU
    cost attached, which surprises me absolutely not at all given WinRT.

The improvement is difficult to quantify because the run to run
variation is very high. But it seems like this shaves about 10% off
of the ~500ms startup delay on my PC depending on how you measure it.

Part of #5907

PR Checklist

  • It starts when it should
  • It doesn't "exit" when it shouldn't
    (Scrolling, Settings reload, Bell \a, Progress \e]9;4;2;80\e\\)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/15204 **Author:** [@lhecker](https://github.com/lhecker) **Created:** 4/18/2023 **Status:** ✅ Merged **Merged:** 4/20/2023 **Merged by:** [@DHowett](https://github.com/DHowett) **Base:** `main` ← **Head:** `dev/lhecker/startup-animations` --- ### 📝 Commits (1) - [`bf8d0b5`](https://github.com/microsoft/terminal/commit/bf8d0b55f4aa2428672d1eeecc038e9342bac4af) Avoid animations during startup ### 📊 Changes **9 files changed** (+235 additions, -169 deletions) <details> <summary>View changed files</summary> 📝 `src/cascadia/TerminalApp/App.xaml` (+18 -1) 📝 `src/cascadia/TerminalApp/SettingsTab.cpp` (+14 -12) 📝 `src/cascadia/TerminalApp/SettingsTab.h` (+1 -1) 📝 `src/cascadia/TerminalApp/TabBase.cpp` (+42 -48) 📝 `src/cascadia/TerminalApp/TabBase.h` (+1 -1) 📝 `src/cascadia/TerminalApp/TerminalTab.cpp` (+142 -96) 📝 `src/cascadia/TerminalApp/TerminalTab.h` (+7 -7) 📝 `src/cascadia/TerminalControl/TermControl.cpp` (+2 -2) 📝 `src/cascadia/TerminalControl/TermControl.xaml` (+8 -1) </details> ### 📄 Description This fixes 3 sources for animations: * `TabView`'s `EntranceThemeTransition` causes tabs to slowly slide in from the bottom. Removing the transition requires you to override the entire list of transitions obviously, which is a global change. Nice. Am I glad I don't need to deal with the complexity of CSS. /s * `TabBase`, `SettingsTab` and `TerminalTab` where using a lot of coroutines with `resume_foreground` even though almost none of the functions are called from background tabs in the first place. This caused us to miss the initial XAML drawing pass, which resulted in animations when the tab icons would asynchronously pop into existence. It also appears as if `resume_foreground`, etc. have a very high CPU cost attached, which surprises me absolutely not at all given WinRT. The improvement is difficult to quantify because the run to run variation is very high. But it seems like this shaves about 10% off of the ~500ms startup delay on my PC depending on how you measure it. Part of #5907 ## PR Checklist * It starts when it should ✅ * It doesn't "exit" when it shouldn't ✅ (Scrolling, Settings reload, Bell `\a`, Progress `\e]9;4;2;80\e\\`) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:41:15 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#30503