Skip to content
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

feat: cache RestMethodInfo #1903

Merged
merged 2 commits into from
Nov 5, 2024

Conversation

TimothyMakkison
Copy link
Contributor

@TimothyMakkison TimothyMakkison commented Nov 1, 2024

  • Converted the string Name property to an expression that returns MethodInfo.Name
  • Removed unused setters from properties
  • AddProperties will reuse the same RestMethodInfo object instead of creating a new one for each request, saving 56 bytes per request.
    • Is this used by consumers or is it only for testing?
    • I could modify RestMethodInfo to contain a private pointer to the parent RestMethodInfoInternal and expose values as expression properties. This would save a couple of bytes for each use of RestMethodInfoInternal but would change the public constructor.

Copy link

codecov bot commented Nov 1, 2024

Codecov Report

Attention: Patch coverage is 95.83333% with 1 line in your changes missing coverage. Please review.

Project coverage is 84.90%. Comparing base (6ebeda5) to head (af19345).
Report is 160 commits behind head on main.

Files with missing lines Patch % Lines
Refit/RequestBuilderImplementation.cs 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1903      +/-   ##
==========================================
- Coverage   87.73%   84.90%   -2.84%     
==========================================
  Files          33       36       +3     
  Lines        2348     2504     +156     
  Branches      294      363      +69     
==========================================
+ Hits         2060     2126      +66     
- Misses        208      299      +91     
+ Partials       80       79       -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ChrisPulman ChrisPulman enabled auto-merge (squash) November 5, 2024 13:00
@ChrisPulman ChrisPulman merged commit a56e9d8 into reactiveui:main Nov 5, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants