Memory Leakage When Navigating Away from Home Page with dash.register_page()
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 24.4k
- Forks
- 2.3k
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 13
Description
Describe your context
There are issues with memory leakage in our Dash application. Specifically, each time users navigate away from the home page, we observe a memory leak of about 15MB. Objects are getting detached but not fully removed, and each time the user changes tabs, new objects are created while the old ones are not removed.
- replace the result of
pip list | grep dashbelow
dash==2.17.0
gunicorn==20.0.4
pandas>=1.1.5
- if frontend related, tell us your Browser, Version and OS
- Browser chrome
Describe the bug
- Navigation: We use dash.register_page() to add a new page to our application. Users navigate away from the home page using dcc.Location and dcc.Link
- Component Setup: The home page layout includes an ag-Grid component within a dcc.Tabs component.
- Callbacks: A callback renders content dynamically based on the selected tab within dcc.Tabs.
Expected behavior
Remove detached objects
Screenshots
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported leak around navigation with dash.register_page(), dcc.Location, dcc.Link, dcc.Tabs, and the ag-Grid component. Compare memory after repeatedly leaving the home page and changing tabs; done means detached objects are removed rather than accumulating. No source file or test is identified in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100