Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

DOM nodes count keeps in Performance monitoring tab keeps growing

Abierto
#1,024 9 comentarios 8 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
35/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
react, typescript

Línea de trabajo

Reproduce el informe con el ejemplo de desplazamiento infinito de React en src/main.tsx, usando la configuración de StackBlitz enlazada y el monitor Performance de Brave DevTools. Compara el recuento creciente de nodos DOM con la pestaña Elements mientras te desplazas y determina después si el comportamiento es el esperado o indica un problema de cleanup; se considera terminado cuando se hayan verificado la causa y cualquier corrección necesaria.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

https://stackblitz.com/github/tanstack/virtual/tree/main/examples/react/infinite-scroll?embed=1&theme=dark&preset=node&file=src/main.tsx

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.
Lenguaje dominante
TypeScript
Estrellas
7.1k
Forks
466
Merge medio
2 d 31 min
PR fusionados (30 d)
13

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de TanStack/virtual

Todos los issues de TanStack/virtual

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.