Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Replace ArrayList with List<GlyphRun> in PtsHost for performance/code quality #9870

Merged
merged 2 commits into from
Oct 19, 2024

Conversation

h3xds1nz
Copy link
Contributor

@h3xds1nz h3xds1nz commented Oct 1, 2024

Description

Replaces ArrayList with List<GlyphRun> to function as a temporary array. Improves code quality by swapping to generic collection. Also makes AddGlyphRunRecursive function static as it does not use any instance members.

Sample benchmark showing difference between ArrayList and List<T> with reference type can be found f.e. in #9432.

Customer Impact

Improved performance, getting rid of ArrayList.

Regression

No.

Testing

Local build.

Risk

None, changes are minimal.

Microsoft Reviewers: Open in CodeFlow

@h3xds1nz h3xds1nz requested review from a team as code owners October 1, 2024 21:32
@dotnet-policy-service dotnet-policy-service bot added PR metadata: Label to tag PRs, to facilitate with triage Community Contribution A label for all community Contributions labels Oct 1, 2024
@siagupta0202 siagupta0202 self-assigned this Oct 10, 2024
@harshit7962 harshit7962 merged commit b340d5c into dotnet:main Oct 19, 2024
8 checks passed
@harshit7962
Copy link
Member

@h3xds1nz Thank you very much for your contributions.

@h3xds1nz
Copy link
Contributor Author

@harshit7962 Happy to contribute.

@github-actions github-actions bot locked and limited conversation to collaborators Nov 19, 2024
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
Community Contribution A label for all community Contributions PR metadata: Label to tag PRs, to facilitate with triage
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants