DesktopWindowXamlSource memory usage - possible leak #15701

Closed
opened 2026-01-31 04:45:57 +00:00 by claunia · 2 comments
Owner

Originally created by @elsaco on GitHub (Oct 26, 2021).

Windows Terminal version (or Windows build number)

Windows Terminal Preview ver. 1.12.2931.0

Other Software

Windows 10

Steps to reproduce

  1. launch WT with one tab only
  2. observer memory usage in task manager
  3. using ctrl+- decrease font size to minimum allowed
  4. check memory usage, focus on DesktopWindowXamlSource reading

Expected Behavior

  1. no large memory increase

Actual Behavior

  1. memory usage for DesktopWindowXamlSource doubles
  2. for each additional tab the memory usage increases when using smallest fonts
  3. memory usage does not increase when using ctrl+= to enlarge fonts

Memory use at WT launch, single tab:
wt_mem_usage

Sample usage with one tab opened:
wt_mem_usage_small

Sample memory usage with two tabs opened:
wt_mem_usage_small_two_tabs

Originally created by @elsaco on GitHub (Oct 26, 2021). ### Windows Terminal version (or Windows build number) Windows Terminal Preview ver. 1.12.2931.0 ### Other Software Windows 10 ### Steps to reproduce 1. launch WT with one tab only 2. observer memory usage in task manager 3. using `ctrl+-` decrease font size to minimum allowed 4. check memory usage, focus on `DesktopWindowXamlSource` reading ### Expected Behavior 1. no large memory increase ### Actual Behavior 1. memory usage for `DesktopWindowXamlSource` doubles 2. for each additional tab the memory usage increases when using smallest fonts 3. memory usage does not increase when using `ctrl+=` to enlarge fonts Memory use at WT launch, single tab: ![wt_mem_usage](https://user-images.githubusercontent.com/3933920/138933471-8b6b2900-5e2c-4a3c-a48a-a4919229c161.PNG) Sample usage with one tab opened: ![wt_mem_usage_small](https://user-images.githubusercontent.com/3933920/138933296-f9425134-d043-4f7b-a36f-6d0c1543addb.PNG) Sample memory usage with two tabs opened: ![wt_mem_usage_small_two_tabs](https://user-images.githubusercontent.com/3933920/138933369-ad5a91cf-ed67-4a35-86d6-432b44dfdf4c.png)
claunia added the Issue-QuestionNeeds-TriageNeeds-Tag-FixResolution-Answered labels 2026-01-31 04:45:58 +00:00
Author
Owner

@LuanVSO commented on GitHub (Oct 26, 2021):

when you decrease the size of the font you are making the size of the text buffer bigger, you can see the if you put the font size back to normal the memory usage is reduced. same thing with tabs, by creating tabs terminal needs to create a buffer to hold the text from that tab, if you close the tab, the memory will go down no leak.
"DesktopWindowXamlSource" is the main windows terminal executable you can see it if you enable the "command line" column in task manager:
image

@LuanVSO commented on GitHub (Oct 26, 2021): when you decrease the size of the font you are making the size of the text buffer bigger, you can see the if you put the font size back to normal the memory usage is reduced. same thing with tabs, by creating tabs terminal needs to create a buffer to hold the text from that tab, if you close the tab, the memory will go down no leak. "DesktopWindowXamlSource" is the main windows terminal executable you can see it if you enable the "command line" column in task manager: ![image](https://user-images.githubusercontent.com/43626415/138941788-11f7a4a5-1abf-48cc-9aeb-484b87d87656.png)
Author
Owner

@zadjii-msft commented on GitHub (Oct 26, 2021):

Yep, I don't think I have anything else to add here. That answer seems to cover it all ☺️

@zadjii-msft commented on GitHub (Oct 26, 2021): Yep, I don't think I have anything else to add here. That answer seems to cover it all ☺️
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#15701