8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5d55fc1 commit 1a895ccCopy full SHA for 1a895cc
core/src/main/java/io/grpc/internal/DelayedClientTransport.java
@@ -316,7 +316,11 @@ final void reprocess(@Nullable SubchannelPicker picker) {
316
if (!hasPendingStreams()) {
317
return;
318
}
319
- pendingStreams.removeAll(toRemove);
+ // Avoid pendingStreams.removeAll() as it can degrade to calling toRemove.contains() for each
320
+ // element in pendingStreams.
321
+ for (PendingStream stream : toRemove) {
322
+ pendingStreams.remove(stream);
323
+ }
324
// Because delayed transport is long-lived, we take this opportunity to down-size the
325
// hashmap.
326
if (pendingStreams.isEmpty()) {
0 commit comments