Allocate a buffer of 100 calls for each RPC handler (#7573)

This commit is contained in:
Edward Oakes
2020-03-12 12:05:30 -07:00
committed by GitHub
parent f165766813
commit 768d0b3b3f
+6 -1
View File
@@ -66,7 +66,12 @@ void GrpcServer::Run() {
// Create calls for all the server call factories.
for (auto &entry : server_call_factories_) {
for (int i = 0; i < num_threads_; i++) {
entry->CreateCall();
// Create a buffer of 100 calls for each RPC handler.
// TODO(edoakes): a small buffer should be fine and seems to have better
// performance, but we don't currently handle backpressure on the client.
for (int j = 0; j < 100; j++) {
entry->CreateCall();
}
}
}
// Start threads that polls incoming requests.