googleapis / googleapis/google-cloud-java

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

Offen
#12,497 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
priority: p3 type: feature request
Vorherrschende Sprache
Java
Sterne
2.1k
Forks
1.2k
Ø Merge
1 T. 23 Std.
Gemergte PRs (30 T.)
154

Beschreibung

**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

Beitragsleitfaden

Beitragsleitfaden öffnen

Bewertung

Dieses Issue wurde noch nicht bewertet.

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.