Icons flash for a frame when switching tabs #1762

Open
opened 2026-01-30 22:35:51 +00:00 by claunia · 0 comments
Owner

Originally created by @zadjii-msft on GitHub (Jun 19, 2019).

Every time we change the focus of a tab/pane, we attempt to update the icon and titlebar of the tab. Since we're only storing a path to the icon in memory, every time you change focus, we need to reload the icon from disk to create the Icon.

This is obviously bad. we should instead be caching the icon once, and just updating the Icon with that pre-loaded one. Or at the very least, we should cache what the path to the last icon we set was, and only reload the icon if the path is different.

Originally created by @zadjii-msft on GitHub (Jun 19, 2019). Every time we change the focus of a tab/pane, we attempt to update the icon and titlebar of the tab. Since we're only storing a _path_ to the icon in memory, every time you change focus, we need to reload the icon from disk to create the `Icon`. This is obviously bad. we should instead be caching the icon once, and just updating the `Icon` with that pre-loaded one. Or at the very least, we should cache what the path to the last icon we set was, and only reload the icon if the path is different.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#1762