Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Kirby Page memory leak #2521

Closed
1 of 9 tasks
RasmusKjeldgaard opened this issue Oct 4, 2022 · 0 comments · Fixed by #2519
Closed
1 of 9 tasks

[BUG] Kirby Page memory leak #2521

RasmusKjeldgaard opened this issue Oct 4, 2022 · 0 comments · Fixed by #2519
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

Comments

@RasmusKjeldgaard
Copy link
Collaborator

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

  1. Go to develop
  2. Spin up the flows app with npm run start:flows
  3. Click on the 'Navigate to list item detail' flow
  4. See how pages are kept in memory in via the Performance monitor in Chrome

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.

  • Make sure the NOT verified label has been removed by a member of team Kirby; do not proceed until this is done

Implementation

The contributor who wants to implement this issue should:

Review

Once the issue has been implemented and is ready for review:

@RasmusKjeldgaard RasmusKjeldgaard added 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 labels Oct 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant