[PR #4797] [MERGED] Improve Word Navigation/Selection Performance #25945

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/4797
Author: @carlos-zamora
Created: 3/4/2020
Status: Merged
Merged: 3/4/2020
Merged by: @undefined

Base: masterHead: dev/cazamor/acc/word-nav-perf


📝 Commits (4)

  • 60a4820 Perf: DelimiterClass Retrieval
  • 1beebb9 Fix word nav last word hang
  • 1c199af Fix Tracing Perf and Update GetSelection
  • 927db38 PR change and SA fix

📊 Changes

8 files changed (+476 additions, -390 deletions)

View changed files

📝 src/buffer/out/CharRow.cpp (+27 -0)
📝 src/buffer/out/CharRow.hpp (+9 -0)
📝 src/buffer/out/textBuffer.cpp (+35 -83)
📝 src/buffer/out/textBuffer.hpp (+1 -7)
📝 src/types/ScreenInfoUiaProviderBase.cpp (+1 -1)
📝 src/types/UiaTextRangeBase.cpp (+4 -0)
📝 src/types/UiaTracing.cpp (+398 -298)
📝 src/types/UiaTracing.h (+1 -1)

📄 Description

Summary of the Pull Request

  1. Improves the performance of word-recognition operations such as word
    navigation in UIA and selection.

  2. Fixes a bug where attempting to find the next word in UIA, when none
    exists, would hang

  3. TraceLogging code only runs when somebody is listening

Detailed Description of the Pull Request / Additional comments

  • The concept of a delimiter class got moved to the CharRow.
  • The buffer iterator used to save a lot more information than we needed
  • I missed updating a tracing function after making GetSelection return
    one text range. That is fixed now.

Validation Steps Performed

Performed Word Navigation under Narrator and NVDA.
NOTE: The release build should be used when testing to optimize
performance

Closes #4703


🔄 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/4797 **Author:** [@carlos-zamora](https://github.com/carlos-zamora) **Created:** 3/4/2020 **Status:** ✅ Merged **Merged:** 3/4/2020 **Merged by:** [@undefined](undefined) **Base:** `master` ← **Head:** `dev/cazamor/acc/word-nav-perf` --- ### 📝 Commits (4) - [`60a4820`](https://github.com/microsoft/terminal/commit/60a48201bb3349bfe58c1fd778ce261f9a27b451) Perf: DelimiterClass Retrieval - [`1beebb9`](https://github.com/microsoft/terminal/commit/1beebb90b86106cb278c89e10335602349dbbfcd) Fix word nav last word hang - [`1c199af`](https://github.com/microsoft/terminal/commit/1c199af0ec59603a019d0387770f270b1933824c) Fix Tracing Perf and Update GetSelection - [`927db38`](https://github.com/microsoft/terminal/commit/927db38e699ec70b42218e6be7d90109dd565aec) PR change and SA fix ### 📊 Changes **8 files changed** (+476 additions, -390 deletions) <details> <summary>View changed files</summary> 📝 `src/buffer/out/CharRow.cpp` (+27 -0) 📝 `src/buffer/out/CharRow.hpp` (+9 -0) 📝 `src/buffer/out/textBuffer.cpp` (+35 -83) 📝 `src/buffer/out/textBuffer.hpp` (+1 -7) 📝 `src/types/ScreenInfoUiaProviderBase.cpp` (+1 -1) 📝 `src/types/UiaTextRangeBase.cpp` (+4 -0) 📝 `src/types/UiaTracing.cpp` (+398 -298) 📝 `src/types/UiaTracing.h` (+1 -1) </details> ### 📄 Description ## Summary of the Pull Request 1) Improves the performance of word-recognition operations such as word navigation in UIA and selection. 2) Fixes a bug where attempting to find the next word in UIA, when none exists, would hang 3) TraceLogging code only runs when somebody is listening ## Detailed Description of the Pull Request / Additional comments - The concept of a delimiter class got moved to the CharRow. - The buffer iterator used to save a lot more information than we needed - I missed updating a tracing function after making GetSelection return one text range. That is fixed now. ## Validation Steps Performed Performed Word Navigation under Narrator and NVDA. NOTE: The release build should be used when testing to optimize performance Closes #4703 --- <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:12:50 +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#25945