mirror of
https://github.com/MarginaliaSearch/MarginaliaSearch.git
synced 2025-02-23 13:09:00 +00:00
(minor) Add warm-up to GrpcMultiNodeChannelPool to speed up the initial messages
Without doing this, connections would be created lazily, which is probably never desirable.
This commit is contained in:
parent
904f2587cd
commit
453bd6064b
@ -40,6 +40,11 @@ public class GrpcMultiNodeChannelPool<STUB> {
|
||||
this.channelConstructor = channelConstructor;
|
||||
this.stubConstructor = stubConstructor;
|
||||
this.nodeConfigurationWatcher = nodeConfigurationWatcher;
|
||||
|
||||
// Warm up the pool to reduce latency for the initial request
|
||||
for (var node : nodeConfigurationWatcher.getQueryNodes()) {
|
||||
apiForNode(node);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user