You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v8.x
Current Behavior
Navigating between pages in an Ionic + Angular application leads to a steadily increasing DOM node count. Over time, this can balloon to tens of thousands of detached DOM nodes (verified via Chrome DevTools), causing performance degradation and application crashes.
Expected Behavior
When a component or page is destroyed/navigated away from, its DOM elements should be properly removed from memory. The DOM node count should not grow indefinitely, ensuring stable performance over time.
Repeatedly navigate next, then back to root. Each will load 5000 nodes.
Note, ngOnDestroy successfully executes
Observe the DOM node count growing with each navigation in the Performance Monitor, and detached DOM nodes in the Memory tab snapshots. Forcing Garbage collection has no effect.
Snapshotting at root, and then again at root after navigation shows Detached <div> of the exact count with set Objects allocated between Snapshot X and Snapshot X
Prerequisites
Ionic Framework Version
v8.x
Current Behavior
Navigating between pages in an Ionic + Angular application leads to a steadily increasing DOM node count. Over time, this can balloon to tens of thousands of detached DOM nodes (verified via Chrome DevTools), causing performance degradation and application crashes.
Expected Behavior
When a component or page is destroyed/navigated away from, its DOM elements should be properly removed from memory. The DOM node count should not grow indefinitely, ensuring stable performance over time.
Steps to Reproduce
npm install
+npm start
Detached <div>
of the exact count with setObjects allocated between Snapshot X and Snapshot X
Screen.Recording.2025-02-26.at.9.40.18.am.mov
Code Reproduction URL
https://github.com/ralphcode/capacitor-angular-dom-leak
Ionic Info
Additional Information
Possibly related to: #30132 (specifically
Resolved performance issues due to detached nodes in memory
)If you need anything further, please let me know
The text was updated successfully, but these errors were encountered: