Skip to content

🔬Look for areas of dotnet 7 & 8 improvements  #810

@CalvinWilkinson

Description

@CalvinWilkinson

Complete The Item Below

  • I have updated the title without removing the 🔬 emoji.

What To Research

Look for areas of improvement and csharp 11 & 12 features to take advantage of throughout the code base. For each feature, create issues if possible to perform the refactoring work to implement the changes.

Resources:


Ideas:

  1. use of required keyword (C# 11):
    Look for areas where the required properties can and should be used.
    • Go here for more information on required properties.
  2. Use of CollectionsMarshal
    • Goto this video (Nick Chapsas)
  3. nameof improvements (C#11):
    Go through the code base and improve places where the nameof keyword can be used. One of the biggest improvements can be in attributes.
  4. Use Of SearchValues struct(C#12):
    • This can give us some huge perf benefits. Especially when it comes to rendering text. Go through the code base and find all areas where this could help us out.
    • Go here for a video on details of the new type.
  5. Look for .ToArray() uses and find how to remove them to reduce allocations
  6. Look into this blog post for more string perf opportunities
  7. Look for opportunities for improvement by using the SearchValues<T> feature.
    • This requires dotnet 9

Research Results

  1. Did not find any use cases for the required keyword

Things to improve:

  1. Improve the KeyboardDataService.cs file by doing suggested refactorings of the Enum type.

Acceptance Criteria

- [ ] Research complete and issues created _(if needed)_.
- [ ] If any issues were created, they have been added to the _**Related Work**_ section below.

ToDo Items

  • Priority label added to this issue. Refer to the Priority Type Labels section below.

Issue Dependencies

No response

Related Work

No response

Additional Information:

Priority Type Labels

Priority Type Label
Low Priority low priority
Medium Priority medium priority
High Priority high priority

Code of Conduct

  • I agree to follow this project's Code of Conduct.

Metadata

Metadata

Labels

Projects

Status

✅Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions