Skip to content

4.x: Cache/Replay operators to be more GC friendly #7912

Open

Description

@akarnokd

⚠️ Due to the unexpectedly long time this issue was up, we require you to target 4.x first and we'll see if it is worth backporting it to an earlier version.

The current implementations of the various cache and replay operators and hot sources can hold onto effectively unreachable elements longer than necessary, causing GC pressure with certain collectors.

The following operators need to be checked and updated.

  • ObservableCache
  • FlowableCache
  • ObservableReplay
  • FlowableReplay
  • ReplaySubject
  • ReplayProcessor

Activity

  1. added this to the 3.1-support milestone on Oct 2, 2025
  2. akarnokd commented on Oct 2, 2025

    @akarnokd
    MemberAuthor

    ObservableCache - #7911

  3. added theissue type on Mar 19, 2026
  4. DragonFSKY commented on Jul 27, 2026

    @DragonFSKY
    Contributor

    I'd like to work on the FlowableCache item in #7912, using the ownership split from ObservableCache #7911 while preserving Flowable's per-subscriber request, cancellation, and serialized replay semantics. I'll add the same focused MemoryMXBean/System.gc regression test. Please let me know if someone is already working on this item.

  5. akarnokd commented on Jul 27, 2026

    @akarnokd
    MemberAuthor

    No one is working on these currently so go ahead 👍

  6. changed the title [-]Cache/Replay operators to be more GC friendly[/-] [+]4.x: Cache/Replay operators to be more GC friendly[/+] on Jul 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions