dotnet / dotnet/reactive

ReplaySubject.Unsubscribe is very slow

Open
#1,399 1 comment 0 reactions 0 assignees View on GitHub
[area] Rx
Dominant language
C#
Stars
7.2k
Forks
798
PR merge metrics
No merged PRs in 30d

Description

ReplaySubject makes usage of ImmutableList to maintain a list of subscribers.

When calling ReplaySubject.Unsubscribe we will call ImmutableList.Remove, which is inefficient for various reasons.

It might be more efficient use a collection which uses GetHashCode.

Additionally, it should be noted, that most accesses to the ImmutableList uses lock(_gate). It might be possible to use a mutable list/hashset instead.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.