[BUG] Kirby Page memory leak #2521
Labels
bug
NOT Prioritized
Issue not yet prioritized and added to a Milestone
NOT Verified
Applied to bug reports that have not been verified by a member of @kirbydesign/kirby-guild
Describe the bug
During a performance audit of DRB a memory leak in Kirby Page was discovered.
When navigating between pages, the Kirby Page is not properly detached when the component is no longer present. This results in an ever increasing amount of DOM nodes kept in the browser, that is not cleaned up by garbage collection and might eventually result in a hard crash, and otherwise just poor performance.
The problem is easily illustrated with two simple pages:
https://user-images.githubusercontent.com/42470636/193853109-5eb944b3-1e20-4eca-bec9-edc26bbada00.mov
As the video shows, the second pages DOM nodes becomes detached and are still in memory when the page is destroyed no longer shown.
Describe how to reproduce the bug
npm run start:flows
Which Kirby version was used?
7.0.0
What was the expected behavior?
We want to see the DOM nodes removed when a page component is popped/removed from the app.
Checklist:
The following tasks should be carried out in sequence in order to follow the process of contributing correctly.
Verification
To make sure the bug is not intended behaviour; it should be verified by a member of team Kirby before moving on to implementation.
NOT verified
label has been removed by a member of team Kirby; do not proceed until this is doneImplementation
The contributor who wants to implement this issue should:
Review
Once the issue has been implemented and is ready for review:
The text was updated successfully, but these errors were encountered: