Skip to content

Replace boxing Hashtable in Grid's Measure, improve performance #10684

New issue

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

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

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

h3xds1nz
Copy link
Member

@h3xds1nz h3xds1nz commented Mar 31, 2025

Description

Replaces boxing Hashtable in Grid's MeasureOverride, improving performance when doing cells calculations.

The key has been changed to a readonly struct to further improve performance.

7 cells benchmark (register+enumerate)

Method children Mean [ns] Error [ns] StdDev [ns] Code Size [B] Gen0 Allocated [B]
Original Child(...)on[7] [21] 283.2 ns 5.66 ns 10.21 ns 4,421 B 0.0873 1464 B
PR__EDIT Child(...)on[7] [21] 112.2 ns 2.23 ns 2.65 ns 4,495 B 0.0324 544 B

Customer Impact

Improved performance, decreased allocations.

Regression

No.

Testing

Local build, benchmark.

Risk

Low.

Microsoft Reviewers: Open in CodeFlow

@h3xds1nz h3xds1nz requested review from a team as code owners March 31, 2025 11:38
@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 Mar 31, 2025
Copy link

codecov bot commented Mar 31, 2025

Codecov Report

Attention: Patch coverage is 0% with 34 lines in your changes missing coverage. Please review.

Project coverage is 11.36855%. Comparing base (4aff730) to head (f3f4e1f).

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main      #10684         +/-   ##
===================================================
+ Coverage   11.28308%   11.36855%   +0.08547%     
===================================================
  Files           3353        3354          +1     
  Lines         668062      668045         -17     
  Branches       74980       74981          +1     
===================================================
+ Hits           75378       75947        +569     
+ Misses        591433      590847        -586     
  Partials        1251        1251                 
Flag Coverage Δ
Debug 11.36855% <0.00000%> (+0.08547%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@siagupta0202 siagupta0202 self-assigned this Apr 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.

2 participants