CmdPal: Icons (6/n) - Clean up managed icon conversion and harden failure handling - #50186
Open
Jiří Polášek (jiripolasek) wants to merge 3 commits into
Conversation
11 tasks
11 tasks
Jiří Polášek (jiripolasek)
marked this pull request as ready for review
August 28, 2026 13:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary of the Pull Request
Part 6 of 12 in the CmdPal icon-loading series. Depends on #50185. Next: #50187.
This PR cleans up the converted helpers and hardens failure handling without changing their API.
Motivation: make the managed implementation safer and cheaper to maintain, while removing identifiable allocations and copying. Scheduling and cache policy remain separate changes.
Evidence
Historical adjacent-stage comparison (2026-08-18); shared method and limitations: the diagnostics foundation PR #50181. This is cleanup and hardening with targeted allocation/copy reductions, not a standalone snappiness claim.
The extra delay is localized to waiting; no individual cleanup edit has been established as its cause. The following cache/materialization PR #50187 mitigates this warm case: applied average falls to 0.306 ms, p99 to ≤1 ms, and all 3590 list-row requests hit cache with no queued materializations in each of three runs. That is measured mitigation, not proof of the original cause or an explanation of every cold result.
Technical notes
ArrayPool.Sharedreduces allocation frequency; it is not a fixed retained-memory budget. Renting and returning buffers correctly does not prove a process-memory reduction.Implementation:
src/modules/cmdpal/Microsoft.CmdPal.UI/Helpers/Icons/FontIconGlyphClassifier.cs.PR Checklist
Detailed Description of the Pull Request / Additional comments
Validation Steps Performed