DOM nodes count keeps in Performance monitoring tab keeps growing
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Cần làm rõ
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- react, typescript
- Lĩnh vực
- frontend, performance
Hướng nghiên cứu
Tái hiện báo cáo với ví dụ cuộn vô hạn của React tại src/main.tsx, sử dụng thiết lập StackBlitz được liên kết và trình giám sát Performance của Brave DevTools. So sánh số lượng nút DOM đang tăng với tab Elements trong khi cuộn, sau đó xác định xem hành vi này có được mong đợi hay cho thấy vấn đề cleanup; được xem là hoàn tất khi nguyên nhân và mọi hiệu chỉnh cần thiết đã được xác minh.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.
- Ngôn ngữ chính
- TypeScript
- Star
- 7.1k
- Fork
- 466
- Merge trung bình
- 2 ngày 31 phút
- Pull request đã merge (30 ngày)
- 13
Hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của TanStack/virtual
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 38/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 62/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 68/100
Tất cả issue của TanStack/virtual
Issue tương tự
-
bug(cli): hapi doctor inline-media prints a fabricated B:\ helper-script path in packaged installs Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Crush Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
catppuccin/catppuccin#3125 ·
-
Add a SECURITY.md Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
ElementsProject/cln-application#167 · 1 bình luận · 1 reaction ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
Quantco/pnpm-licenses#17 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100