[PR #11889] [MERGED] Remove wasteful virtuals according to SizeBench #28784

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/11889
Author: @lhecker
Created: 12/7/2021
Status: ✅ Merged
Merged: 1/7/2022
Merged by: @undefined

Base: main ← Head: dev/lhecker/remove-wasteful-virtuals


📝 Commits (3)

  • cfab0f1 Remove wasteful virtuals according to SizeBench
  • e2d24aa Fix compilation error
  • 66dab0d Address feedback

📊 Changes

27 files changed (+84 additions, -255 deletions)

View changed files

📝 .github/actions/spelling/expect/expect.txt (+1 -1)
📝 src/host/PtySignalInputThread.hpp (+5 -0)
📝 src/host/VtIo.hpp (+8 -5)
📝 src/host/inputBuffer.cpp (+1 -1)
📝 src/host/inputBuffer.hpp (+8 -5)
📝 src/host/readData.hpp (+1 -0)
📝 src/host/screenInfo.cpp (+2 -2)
📝 src/host/screenInfo.hpp (+1 -3)
➖ src/inc/ITerminalOutputConnection.hpp (+0 -32)
➖ src/inc/ITerminalOwner.hpp (+0 -33)
📝 src/interactivity/onecore/ConIoSrvComm.cpp (+1 -1)
📝 src/renderer/base/FontInfoBase.cpp (+0 -3)
📝 src/renderer/base/lib/base.vcxproj (+0 -1)
📝 src/renderer/base/lib/base.vcxproj.filters (+0 -3)
📝 src/renderer/base/renderer.cpp (+2 -3)
📝 src/renderer/base/renderer.hpp (+14 -16)
📝 src/renderer/base/thread.cpp (+4 -3)
📝 src/renderer/base/thread.hpp (+10 -11)
📝 src/renderer/inc/IRenderEngine.hpp (+1 -1)
➖ src/renderer/inc/IRenderThread.hpp (+0 -37)

...and 7 more files

📄 Description

This commit removes some pure virtual base classes from conhost,
found with the help of SizeBench. This reduces binary size by 5kB.
The reduction in code size however is the main benefit of this.

Additionally this fixes a mysterious, undebuggable crash in
~RenderThread(), caused by a Control Flow Guard failure when
the class was destroyed over its IRenderThread interface.

PR Checklist

  • I work here
  • Tests added/passed

Validation Steps Performed

  • Printing text works ✅
  • Printing VT works ✅
  • Performance is alright ✅

🔄 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/11889 **Author:** [@lhecker](https://github.com/lhecker) **Created:** 12/7/2021 **Status:** ✅ Merged **Merged:** 1/7/2022 **Merged by:** [@undefined](undefined) **Base:** `main` ← **Head:** `dev/lhecker/remove-wasteful-virtuals` --- ### 📝 Commits (3) - [`cfab0f1`](https://github.com/microsoft/terminal/commit/cfab0f1378da466dbe7b6f5cc0583ce9993a0b5c) Remove wasteful virtuals according to SizeBench - [`e2d24aa`](https://github.com/microsoft/terminal/commit/e2d24aa33ff20a8877141ce7159fbda3a618b845) Fix compilation error - [`66dab0d`](https://github.com/microsoft/terminal/commit/66dab0dd31861838516ceb81467b901679f853dd) Address feedback ### 📊 Changes **27 files changed** (+84 additions, -255 deletions) <details> <summary>View changed files</summary> 📝 `.github/actions/spelling/expect/expect.txt` (+1 -1) 📝 `src/host/PtySignalInputThread.hpp` (+5 -0) 📝 `src/host/VtIo.hpp` (+8 -5) 📝 `src/host/inputBuffer.cpp` (+1 -1) 📝 `src/host/inputBuffer.hpp` (+8 -5) 📝 `src/host/readData.hpp` (+1 -0) 📝 `src/host/screenInfo.cpp` (+2 -2) 📝 `src/host/screenInfo.hpp` (+1 -3) ➖ `src/inc/ITerminalOutputConnection.hpp` (+0 -32) ➖ `src/inc/ITerminalOwner.hpp` (+0 -33) 📝 `src/interactivity/onecore/ConIoSrvComm.cpp` (+1 -1) 📝 `src/renderer/base/FontInfoBase.cpp` (+0 -3) 📝 `src/renderer/base/lib/base.vcxproj` (+0 -1) 📝 `src/renderer/base/lib/base.vcxproj.filters` (+0 -3) 📝 `src/renderer/base/renderer.cpp` (+2 -3) 📝 `src/renderer/base/renderer.hpp` (+14 -16) 📝 `src/renderer/base/thread.cpp` (+4 -3) 📝 `src/renderer/base/thread.hpp` (+10 -11) 📝 `src/renderer/inc/IRenderEngine.hpp` (+1 -1) ➖ `src/renderer/inc/IRenderThread.hpp` (+0 -37) _...and 7 more files_ </details> ### 📄 Description This commit removes some pure virtual base classes from conhost, found with the help of SizeBench. This reduces binary size by 5kB. The reduction in code size however is the main benefit of this. Additionally this fixes a mysterious, undebuggable crash in ~RenderThread(), caused by a Control Flow Guard failure when the class was destroyed over its IRenderThread interface. ## PR Checklist * [x] I work here * [x] Tests added/passed ## Validation Steps Performed * Printing text works ✅ * Printing VT works ✅ * Performance is alright ✅ --- <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:30:43 +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#28784