[PR #5584] [MERGED] Improve cluster construction performance #26378

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/5584
Author: @skyline75489
Created: 4/27/2020
Status: Merged
Merged: 4/28/2020
Merged by: @undefined

Base: masterHead: fix/vector-back-overhead


📝 Commits (3)

  • 3619a5a Improve cluster construction performance
  • 2cfe108 Update src/renderer/base/renderer.cpp
  • e819bd7 Update src/renderer/base/renderer.cpp

📊 Changes

1 file changed (+6 additions, -3 deletions)

View changed files

📝 src/renderer/base/renderer.cpp (+6 -3)

📄 Description

Summary of the Pull Request

A tiny performance fix in renderer.cpp.

References

PR Checklist

  • Closes #xxx
  • CLA signed. If not, go over here and sign the CLA
  • Tests added/passed
  • Requires documentation to be updated
  • I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

Detailed Description of the Pull Request / Additional comments

The cluster construction code is intensively called during rendering. Even though a single back() is fast, but accumulated back()s still take a noticiable amount of CPU cycles.

Before:

perf1

After:

图片

Validation Steps Performed

Manually validated.


🔄 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/5584 **Author:** [@skyline75489](https://github.com/skyline75489) **Created:** 4/27/2020 **Status:** ✅ Merged **Merged:** 4/28/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `fix/vector-back-overhead` --- ### 📝 Commits (3) - [`3619a5a`](https://github.com/microsoft/terminal/commit/3619a5a84cf38a5233509fb2992eca5bf5893c23) Improve cluster construction performance - [`2cfe108`](https://github.com/microsoft/terminal/commit/2cfe1087ccf238cbe2949f1b171f08dee54d090b) Update src/renderer/base/renderer.cpp - [`e819bd7`](https://github.com/microsoft/terminal/commit/e819bd76c7a2b2abb962548c9c1f7cf32782c212) Update src/renderer/base/renderer.cpp ### 📊 Changes **1 file changed** (+6 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `src/renderer/base/renderer.cpp` (+6 -3) </details> ### 📄 Description <!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? --> ## Summary of the Pull Request A tiny performance fix in `renderer.cpp`. <!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> ## References <!-- Please review the items on the PR checklist before submitting--> ## PR Checklist * [ ] Closes #xxx * [X] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA * [ ] Tests added/passed * [ ] Requires documentation to be updated * [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx <!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here --> ## Detailed Description of the Pull Request / Additional comments The cluster construction code is intensively called during rendering. Even though a single `back()` is fast, but accumulated `back()`s still take a noticiable amount of CPU cycles. Before: ![perf1](https://user-images.githubusercontent.com/4710575/80323322-4342aa80-885d-11ea-92fb-06998dcef327.png) After: ![图片](https://user-images.githubusercontent.com/4710575/80323336-52c1f380-885d-11ea-8244-4d8d432f7c52.png) <!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well --> ## Validation Steps Performed Manually validated. --- <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:15:42 +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#26378