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

gapic: consolidate routing header parsing/injection #1304

Open
noahdietz opened this issue Apr 17, 2023 · 1 comment
Open

gapic: consolidate routing header parsing/injection #1304

noahdietz opened this issue Apr 17, 2023 · 1 comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@noahdietz
Copy link
Collaborator

The google.api.routing annotation can be configured to parse out portions of a field's value for injection into the x-goog-request-params. Originally implemented in #887, a few improvements are possible:

  • Consolidate application of regexes and header building into gax-go. A similar endeavor was achieved in gax-php.
  • initialize regexes on init rather than on every method invocation
@noahdietz noahdietz added the type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. label Apr 17, 2023
@noahdietz noahdietz added this to the Go GAPIC Modernization milestone Apr 17, 2023
@codyoss
Copy link
Member

codyoss commented Jul 19, 2023

We should try to remove the use of regexp compile from the hotpath of api calls as this could be a concern for performance sensitive apis like a GCS read. Have not thought through or looked at the viability of this, but something to investigate. Seems like we could at minimum make this a sunken at package load cost by making these private globals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

No branches or pull requests

2 participants