Skip to content

SRFE-8790 cleanup child nodes recursively - #12

Merged
dhaval-valotia merged 1 commit into
mixpanel-releasefrom
drv-sr-cleanup
Mar 16, 2026
Merged

SRFE-8790 cleanup child nodes recursively#12
dhaval-valotia merged 1 commit into
mixpanel-releasefrom
drv-sr-cleanup

Conversation

@dhaval-valotia

@dhaval-valotia dhaval-valotia commented Mar 10, 2026

Copy link
Copy Markdown

Worked on this some more. The previous change helped was using removeNodeFromMap which recursively went through the child nodes to remove them from the map which holds strong references thus preventing GC. But for iframes, we also need to check contentDocument

In this change we recurse through the child nodes as well as part of cleanup.. Attaching a log file as well which shows a decrease in the mirror size.

logs4.txt

Also updated upstream pr https://github.com/rrweb-io/rrweb/pull/1791/changes

@dhaval-valotia
dhaval-valotia requested a review from jakewski March 11, 2026 20:46
@dhaval-valotia
dhaval-valotia merged commit 37dbfa1 into mixpanel-release Mar 16, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants