googleapis / googleapis/google-cloud-java

[sdk-platform-java] Speed up channel pool creation by parallelizing the creation of the channels

Ouverte
#12,497 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
priority: p3 type: feature request
Langage dominant
Java
Étoiles
2.1k
Forks
1.2k
Merge moyen
1 j 23 h
PR mergées (30 j)
154

Description

**Is your feature request related to a problem? Please describe.**
When a channel pool is large and channel priming is enabled, it could take a long time to instantiate a client. This happens because the channels are created serially with the primer application inline:

https://github.com/googleapis/sdk-platform-java/blob/cc5724f04722e3d60eb9b4e02ecc1bdf5dd7a7fa/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/ChannelPool.java#L106-L108

https://github.com/googleapis/sdk-platform-java/blob/cc5724f04722e3d60eb9b4e02ecc1bdf5dd7a7fa/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/InstantiatingGrpcChannelProvider.java#L392-L393

**Describe the solution you'd like**
I think having the ChannelPool constructor create a temporary ForkJoin pool to invoke createSingleChannel would drastically improve start up times.

Internal issue: b/283099177

Guide de contribution

Ouvrir le guide de contribution

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.