Reduce memory usage for rune width cache.#1756
Merged
patriksvensson merged 3 commits intospectreconsole:mainfrom Jun 20, 2025
Merged
Reduce memory usage for rune width cache.#1756patriksvensson merged 3 commits intospectreconsole:mainfrom
patriksvensson merged 3 commits intospectreconsole:mainfrom
Conversation
Contributor
Author
|
@microsoft-github-policy-service agree |
phil-scott-78
approved these changes
Feb 11, 2025
Contributor
phil-scott-78
left a comment
There was a problem hiding this comment.
I think I was the last to touch this an it looks good to me. Pulled it down and tested it, all good. Slightly faster. Only thing I'd be tempted to change would be using Array.Fill instead of the loop to grab some perf since that's the goal here, but we'd need a polyfill or a conditional for a fall back to the loop for netstandard 2.0
Contributor
Author
|
Done |
Contributor
Author
|
will this be merged? |
Contributor
|
Merged! Thank you for your contribution. Much appreciated! 👍 |
Contributor
Author
|
thanks!<3 |
This was referenced Sep 8, 2025
This was referenced Mar 1, 2026
Open
This was referenced Mar 10, 2026
This was referenced Mar 18, 2026
This was referenced Mar 25, 2026
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.
Changes
The rune width cache array consumes half a megabyte because it uses a Nullable to store values. This PR slashes the memory requirements to an eighth of what it was before with no loss of functionality.
Please upvote 👍 this pull request if you are interested in it.