Skip to content

Conversation

@jnyrup
Copy link
Member

@jnyrup jnyrup commented Sep 25, 2023

Picking some low-hanging fruits in TypeMemberReflector to speed it up a bit.

The _Old suffix is the version of TypeMemberReflector in develop.
The "Ratio" column is manually calculated as new / old

Method Mean Ratio Error StdDev Gen0 Allocated Ratio
Publicc 2.759 us 0.55 0.0548 us 0.0631 us 0.5646 3.46 KB 0.60
Publicc_Old 5.006 us 0.0433 us 0.0384 us 0.9384 5.77 KB
Public_Internal 4.190 us 0.60 0.0386 us 0.0342 us 0.8240 5.06 KB 0.70
Public_Internal_Old 6.947 us 0.0212 us 0.0177 us 1.1673 7.18 KB
Public_Internal_ExplicitlyImplemented 6.302 us 0.90 0.0206 us 0.0182 us 1.0071 6.20 KB 0.84
Public_Internal_ExplicitlyImplemented_Old 7.017 us 0.0212 us 0.0198 us 1.1902 7.34 KB

IMPORTANT

  • If the PR touches the public API, the changes have been approved in a separate issue with the "api-approved" label.
  • The code complies with the Coding Guidelines for C#.
  • The changes are covered by unit tests which follow the Arrange-Act-Assert syntax and the naming conventions such as is used in these tests.
  • If the PR adds a feature or fixes a bug, please update the release notes with a functional description that explains what the change means to consumers of this library, which are published on the website.
  • If the PR changes the public API the changes needs to be included by running AcceptApiChanges.ps1 or AcceptApiChanges.sh.
  • If the PR affects the documentation, please include your changes in this pull request so the documentation will appear on the website.
    • Please also run ./build.sh --target spellcheck or .\build.ps1 --target spellcheck before pushing and check the good outcome

@github-actions
Copy link

github-actions bot commented Sep 25, 2023

Qodana for .NET

It seems all right 👌

No new problems were found according to the checks applied

💡 Qodana analysis was run in the pull request mode: only the changed files were checked

View the detailed Qodana report

To be able to view the detailed Qodana report, you can either:

  1. Register at Qodana Cloud and configure the action
  2. Use GitHub Code Scanning with Qodana
  3. Host Qodana report at GitHub Pages
  4. Inspect and use qodana.sarif.json (see the Qodana SARIF format for details)

To get *.log files or any other Qodana artifacts, run the action with upload-result option set to true,
so that the action will upload the files as the job artifacts:

      - name: 'Qodana Scan'
        uses: JetBrains/qodana-action@v2023.2.6
        with:
          upload-result: true
Contact Qodana team

Contact us at qodana-support@jetbrains.com

@coveralls
Copy link

Pull Request Test Coverage Report for Build 6303663841

  • 7 of 7 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.001%) to 97.276%

Totals Coverage Status
Change from base Build 6302426774: -0.001%
Covered Lines: 11621
Relevant Lines: 11827

💛 - Coveralls

@jnyrup
Copy link
Member Author

jnyrup commented Sep 25, 2023

The file still has 100% line and branch coverage.
The reduction is because we now do the same in less code.

Duplicate check of !field.IsPrivate
image

We null-Guarded GetMethod in IsExplicitImplementation and later removing members without a getter.
image

Copy link
Member

@dennisdoomen dennisdoomen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about the Qodana issue?

@jnyrup
Copy link
Member Author

jnyrup commented Sep 27, 2023

What about the Qodana issue?

Hadn't noticed that.

Qodana cannot see that HasGetter filters out properties without a GetMethod.

So either the code must be restructured to make that visible to Qodana, or we add ! in IsExplicitImplementation

@dennisdoomen
Copy link
Member

So either the code must be restructured to make that visible to Qodana, or we add ! in IsExplicitImplementation

That's what my pragmatic mind would do ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants