Skip to content

Conversation

@h3xds1nz
Copy link
Member

@h3xds1nz h3xds1nz commented Oct 14, 2024

Description

Removes unnecessary byte[] , char[] and StringBuilder alocations during post-input processing when the char is inputted via Alt+Numpad combination. This is not somewhat impactful allocation but it will allow for more optimizations in the future.

Time spent is cut by 2/5 which is more impactful in this case.

GetCurrentOEMCPEncoding method chain call

Method Mean [ns] Error [ns] StdDev [ns] Gen0 Code Size [B] Allocated [B]
Original 48.77 ns 0.674 ns 0.630 ns 0.0086 814 B 144 B
PR_EDIT 31.83 ns 0.292 ns 0.273 ns 0.0019 418 B 32 B

Customer Impact

Improved performance, decreased allocations.

Regression

No.

Testing

Local build, text input.

Risk

Low.

Microsoft Reviewers: Open in CodeFlow

himgoyalmicro
himgoyalmicro previously approved these changes Apr 1, 2025
@himgoyalmicro
Copy link
Contributor

@h3xds1nz this PR is good to be merged. Can you please resolve the merge conflicts?

@h3xds1nz
Copy link
Member Author

h3xds1nz commented Apr 1, 2025

@himgoyalmicro Done :)

@himgoyalmicro himgoyalmicro merged commit fa5a913 into dotnet:main Apr 1, 2025
8 checks passed
@himgoyalmicro
Copy link
Contributor

Thank you @h3xds1nz for your consistent and valuable contributions. 😄😄

@codecov
Copy link

codecov bot commented Apr 1, 2025

Codecov Report

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

Project coverage is 11.21741%. Comparing base (4aff730) to head (9879f39).
Report is 4 commits behind head on main.

Additional details and impacted files
@@                 Coverage Diff                 @@
##                main       #9954         +/-   ##
===================================================
- Coverage   11.28308%   11.21741%   -0.06568%     
===================================================
  Files           3353        3353                 
  Lines         668062      668051         -11     
  Branches       74980       74980                 
===================================================
- Hits           75378       74938        -440     
- Misses        591433      591867        +434     
+ Partials        1251        1246          -5     
Flag Coverage Δ
Debug 11.21741% <0.00000%> (-0.06568%) ⬇️

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.

@h3xds1nz
Copy link
Member Author

h3xds1nz commented Apr 1, 2025

@himgoyalmicro Thank you for merging :)

@github-actions github-actions bot locked and limited conversation to collaborators May 2, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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