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

Parse the url only once per Client #467

Merged
merged 3 commits into from
Mar 6, 2023

Commits on Feb 18, 2023

  1. client: Parse the url only once per Client

    This stood out on flame graphs due ultimately to the
    http.NewRequestFromContext call, which ends up calling url.Parse.
    
    I did an optimization in connectrpc#447 which similarly, and this is a natural
    extension of this.
    
    We can just parse the url string once during NewClient, validate at that
    point, then tag along the parsed *url.URL everywhere else and never use
    it as a string again. This value never mutates through the lifetime of a
    Client and isn't publicly available on any structs.
    mattrobenolt committed Feb 18, 2023
    Configuration menu
    Copy the full SHA
    cde703b View commit details
    Browse the repository at this point in the history

Commits on Mar 6, 2023

  1. Configuration menu
    Copy the full SHA
    690ecf6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    3b446aa View commit details
    Browse the repository at this point in the history