Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,11 @@ final void reprocess(@Nullable SubchannelPicker picker) {
if (!hasPendingStreams()) {
return;
}
pendingStreams.removeAll(toRemove);
// Avoid pendingStreams.removeAll() as it can degrade to calling toRemove.contains() for each
// element in pendingStreams.
for (PendingStream stream : toRemove) {
pendingStreams.remove(stream);
}
// Because delayed transport is long-lived, we take this opportunity to down-size the
// hashmap.
if (pendingStreams.isEmpty()) {
Expand Down