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: WIP optimize url creation #1730

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TimothyMakkison
Copy link
Contributor

@TimothyMakkison TimothyMakkison commented Jun 22, 2024

WIP; Uses the first call to determine the substitutions for the URL.

  • This might be a "breaking change" as the url conversion is done later on and in bulk, in addition to calling UrlParameterFormatter.Format on the same value if it appears several times in the URL.
    • If this is an issue I can use a ValueListBuilder to preserve the order of operations and to cache values,
  • ParameterFragment is my messy attempt to create a tagged union.
    • Instead of having a string Value property it could be an index and count representing the reevant area in the original url.
  • Uses ValueStringBuilder I'll need to rebase this after feat: use ValueStringBuilder adding the query parameters #1719 is merged.
  • This would ideally be done in the source generator.
  • Could do with some benchmarks, especially for startup times.

@ChrisPulman ChrisPulman marked this pull request as draft June 22, 2024 22:15
Copy link

codecov bot commented Jun 22, 2024

Codecov Report

Attention: Patch coverage is 93.43066% with 9 lines in your changes missing coverage. Please review.

Project coverage is 84.59%. Comparing base (6ebeda5) to head (39e0db7).
Report is 43 commits behind head on main.

Files Patch % Lines
Refit/RestMethodInfo.cs 94.11% 3 Missing and 2 partials ⚠️
Refit/RequestBuilderImplementation.cs 92.30% 1 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1730      +/-   ##
==========================================
- Coverage   87.73%   84.59%   -3.14%     
==========================================
  Files          33       35       +2     
  Lines        2348     2487     +139     
  Branches      294      327      +33     
==========================================
+ Hits         2060     2104      +44     
- Misses        208      299      +91     
- Partials       80       84       +4     

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

@TimothyMakkison TimothyMakkison changed the title feat: optimize url creation feat: WIP optimize url creation Jun 22, 2024
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.

None yet

1 participant