[PR #11727] Fix a conhost binary size regression due to fmt #28722

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

Original Pull Request: https://github.com/microsoft/terminal/pull/11727

State: closed
Merged: Yes


6140fd9 causes a binary size regression in conhost.
This PR fixes most if not all of the regression, by replacing FMT_STRING
with FMT_COMPILE allowing us to drop most of the formatters built
into fmt during linking (for instance floating point formatters).

Additionally std::wstring was replaced with fmt::basic_memory_buffer
in the same vein as was done for VtEngine. Stack is
cheap and this prevents any unnecessary allocations.

PR Checklist

  • I work here
  • Tests added/passed

Validation Steps Performed

  • vttest 11.2.5.3.6.7 and .8 (DECSTBM and SGR) complete successfully
**Original Pull Request:** https://github.com/microsoft/terminal/pull/11727 **State:** closed **Merged:** Yes --- 6140fd9 causes a binary size regression in conhost. This PR fixes most if not all of the regression, by replacing `FMT_STRING` with `FMT_COMPILE` allowing us to drop most of the formatters built into fmt during linking (for instance floating point formatters). Additionally `std::wstring` was replaced with `fmt::basic_memory_buffer` in the same vein as was done for VtEngine. Stack is cheap and this prevents any unnecessary allocations. ## PR Checklist * [x] I work here * [x] Tests added/passed ## Validation Steps Performed * vttest 11.2.5.3.6.7 and .8 (DECSTBM and SGR) complete successfully ✅
claunia added the pull-request label 2026-01-31 09:30:21 +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#28722