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

[Spanner] GrpcTransport is created five times per request #1851

Closed
castaneai opened this issue Apr 26, 2019 · 0 comments · Fixed by #1852
Closed

[Spanner] GrpcTransport is created five times per request #1851

castaneai opened this issue Apr 26, 2019 · 0 comments · Fixed by #1852
Assignees
Labels
api: spanner Issues related to the Spanner API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.

Comments

@castaneai
Copy link

Hi,
I found that GrpcTransport is created five times per request.
According to my research, GrpcTransport::__construct is called from the following file:

https://github.com/googleapis/google-cloud-php/blob/master/Spanner/src/Connection/Grpc.php#L174

Google\Cloud\Spanner\Connection\Grpc::__construct creates the following four GrpcTransport instances for each call:

  • SpannerGapicClient
  • InstanceAdminGapicClient
  • OperationsGapicClient from InstanceAdminGapicClient
  • DatabaseAdminGapicClient
  • OperationsGapicClient from DatabaseAdminGapicClient

Since web applications to be exposed to users do not require InstanceAdmin Client or DatabaseAdmin Client, generating these five transports may be a waste of work.
What do you think?

image

@jdpedrie jdpedrie added api: spanner Issues related to the Spanner API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design. labels Apr 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner Issues related to the Spanner API. type: feature request ‘Nice-to-have’ improvement, new feature or different behavior or design.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants