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 8cc0d4c commit 1435323Copy full SHA for 1435323
core/src/main/java/io/grpc/internal/DelayedClientTransport.java
@@ -325,7 +325,11 @@ final void reprocess(@Nullable SubchannelPicker picker) {
325
if (!hasPendingStreams()) {
326
return;
327
}
328
- pendingStreams.removeAll(toRemove);
+ // Avoid pendingStreams.removeAll() as it can degrade to calling toRemove.contains() for each
329
+ // element in pendingStreams.
330
+ for (PendingStream stream : toRemove) {
331
+ pendingStreams.remove(stream);
332
+ }
333
// Because delayed transport is long-lived, we take this opportunity to down-size the
334
// hashmap.
335
if (pendingStreams.isEmpty()) {
0 commit comments