Skip to content

Investigate potential memory leak #585

Open

Description

@techniq
  • Open streaming example
  • Click Load more on page
  • Open DevTools
  • Take heap snapshot on Memory tab
  • Click Load more on page
  • Take heap snapshot on Memory tab
  • Click on Snapshot 2 and filter Objects retained by detached DOM nodes
  • See also Objects allocated between Snapshot 1 and Snapshot 2

Image

Also, open Performance monitor and click Start on page to stream data and watch the fluctuations on JS heap size (with GC kicking in, but still a general upward trend). More notable, see the large / consistent increase in DOM nodes .

Image

See discussion


Investigated streaming performance a few weeks ago when using Canvas and substantially improved the issue, but wasn't able to 100% resolve the issue.

Activity

  1. techniq commented on Jul 3, 2025

    @techniq
    OwnerAuthor

    Narrowed it down to something in Axis (Text, etc).

    CleanShot.2025-07-02.at.23.59.44.mp4
  2. techniq commented on Jul 3, 2025

    @techniq
    OwnerAuthor

    Reduced by over 90% with a high frequency update over 30s via #586 (released as 2.0.0-next.28).

    This also greatly improves the update speed of time axis:

    Before

    CleanShot.2025-07-03.at.09.16.52.mp4

    After

    CleanShot.2025-07-03.at.09.17.24.mp4

    Still trying to track down the remaining leak (it's within Axis) but not making much sense to be at the moment.

  3. techniq commented on Aug 11, 2026

    @techniq
    OwnerAuthor

    substantially reduced memory leak as part of work in #896 (notably dbcc8c8) when using Spline, such as running Perf Streaming for a minute and then forcing a GC

    before after
    Image Image

    even more noticeable if you leave perf streaming running for a minute

    before after
    Image Image
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions