DOM nodes count keeps in Performance monitoring tab keeps growing
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
- Type d'issue
- Bug
- Clarté
- À clarifier
- Activité
- À l'abandon
- Stack technique
- react, typescript
- Domaine
- frontend, performance
Piste de recherche
Reproduire le rapport avec l’exemple de défilement infini React dans src/main.tsx, en utilisant la configuration StackBlitz liée et le moniteur Performance de Brave DevTools. Comparer le nombre croissant de nœuds DOM avec l’onglet Elements pendant le défilement, puis déterminer si le comportement est attendu ou indique un problème de cleanup ; la tâche est terminée lorsque la cause et toute correction nécessaire sont vérifiées.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Describe the bug
I’ve been using this library to virtualise a grid, and while testing, I noticed that the DOM node count keeps increasing when monitoring via the Performance monitoring tab in Brave DevTools.
At first, I assumed it might be an issue with my implementation, so I tested one of the official examples – specifically, the infinite scroll demo from the website.
Inspecting the Elements tab, it does appear that items are being mounted and unmounted correctly as I scroll. However, the total DOM node count continues to rise, which seems unexpected for a virtualised list.
I then wondered if the performance monitor might be counting some kind of 'virtual' or detached nodes, but to compare, I tried react-virtuoso. There, the node count rises initially as you scroll, but drops back down when items go out of view – which is the behaviour I would expect.
Is this increasing DOM node count an expected behaviour with TanStack Virtual, or could it be a memory leak or cleanup issue?
Your minimal, reproducible example
Steps to reproduce
1.) Used the code from the above example, see here.
2.) Open 'Performance monitoring' on this page: https://owailmmbkggithub-0flc--5173--10996a95.local.webcontainer.io/, and then start scrolling.
Expected behavior
Number of DOM nodes should drop back down as user scrolls - it shouldn't keep increasing.
How often does this bug happen?
Appears to be happening consistently.
Screenshots or Videos
https://github.com/user-attachments/assets/1b4f41c2-53a8-4761-8d65-da21568415b5
Platform
- OS: macOS
- Browser: Brave
tanstack-virtual version
3.13.10
TypeScript version
No response
Additional context
No response
Terms & Code of Conduct
- I agree to follow this project's Code of Conduct
- I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.
- Langage dominant
- TypeScript
- Étoiles
- 7.1k
- Forks
- 466
- Merge moyen
- 2 j 31 min
- PR mergées (30 j)
- 13
Guide de contribution
Ouvrir le guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de TanStack/virtual
-
Difficulté 4/5 3-5 jours Accessibilité débutants 55/100
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 38/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 62/100
-
Difficulté 4/5 3-5 jours Accessibilité débutants 55/100
-
Difficulté 3/5 1-2 jours Accessibilité débutants 68/100
Toutes les issues de TanStack/virtual
Issues similaires
-
Difficulté 1/5 1-3 heures Accessibilité débutants 88/100
motiondivision/motion#3849 ·
-
Add: S Play Event HD Ouvertecheck:passed streams:add
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
-
Improvement for contact popover Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
-
LiteLLM proxy response_cost (x-litellm-response-cost) is never applied to ChatModelOutput.cost Ouvertebug
Difficulté 2/5 1-3 heures Accessibilité débutants 84/100
i-am-bee/beeai-framework#1697 · 1 réaction ·
-
Support bun dedupe Ouverteenhancement
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
antfu/node-modules-inspector#214 ·