Chuyển đến nội dung
Skillpedia
Website và giao diện (frontend)75k · #2924

list-virtualization

Skill này làm gì

Skill này xem các danh sách dài, bảng và nguồn cấp tải hết mọi mục cùng lúc, rồi gợi ý cách chỉ render phần đang hiển thị trên màn hình. Skill dành cho lập trình viên xây bảng điều khiển, kết quả tìm kiếm hoặc nguồn cấp.

Khi nào nên dùng

  • ✓Khi bạn nhờ agent tăng tốc một trang hiển thị hàng trăm hoặc hàng nghìn dòng.
  • ✓Khi bảng quản trị, bảng điều khiển hoặc nguồn cấp chậm khi cuộn vì kích thước của nó.
  • ✓Khi bạn muốn đo xem một danh sách dài có thật sự cần thay đổi này không trước khi thêm code.

Liên kết skill

https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/list-virtualization/SKILL.md

Sao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.

Cách dùng

Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.

Tin nhắn có sẵn để dán

Hãy dùng skill này để giúp tôi: https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/list-virtualization/SKILL.md Đọc tệp SKILL.md tại liên kết đó và làm theo hướng dẫn cho việc của tôi.
Bạn muốn AI tự tìm những skill như thế này?Cài MCP Skillpedia miễn phí: chỉ một dòng, và AI sẽ tìm trong 15.000+ skill trước mỗi việc.Cài đặt trong 1 phút →

Ví dụ cách nhờ AI

“Bảng quản trị có hàng nghìn dòng của tôi cuộn rất chậm. Bạn có thể giúp làm nó nhanh hơn không?”

5 skill mới mỗi tuần. Đọc chỉ 1 phút.

Cách hoạt động

Agent kiểm tra xem trang có render quá nhiều mục cùng lúc không. Nếu có, nó gợi ý cách windowing, chỉ giữ các dòng đang nhìn thấy cùng một vùng đệm nhỏ trong trang.

Nội dung kỹ thuật (SKILL.md gốc)

Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.

Virtualize long lists and tables

Rendering hundreds or thousands of rows at once wastes memory and makes style calculation, layout, and painting more expensive. Virtualization keeps large collections responsive by limiting the number of mounted nodes.

Quick Reference

  • Render only what is visible plus a small overscan buffer instead of the entire list
  • Use virtualization when repeated rows or cards push DOM size and layout cost too high
  • Preserve item sizing, keyboard access, and screen-reader semantics when windowing content
  • Measure scroll smoothness, memory use, and DOM node count before and after the change

Check

Inspect long lists, tables, grids, and feeds for places where the UI renders every item at once. Flag views where the number of mounted rows or cards is large enough to create DOM, memory, or scroll-performance issues.

Fix

Introduce list or table virtualization so only the visible rows plus overscan render, while preserving sizing, keyboard navigation, and any required sticky headers or selection behavior.

Explain

Explain list virtualization, why it improves performance for large collections, and the tradeoffs engineers need to watch for around measurement and accessibility.

Code Review

Inspect collection components, data tables, infinite feeds, and dashboards. Flag places where rendering the full dataset creates excessive DOM nodes or scroll jank, and verify the virtualization strategy still preserves item identity, semantics, and expected interactions.


For full implementation details, code examples, and framework-specific guidance, see references/rule.md.

Rule page: https://frontendchecklist.io/rules/performance/list-virtualization

Câu hỏi thường gặp

Mọi danh sách đều cần cách này sao?

Không. Skill nói danh sách nhỏ thường không cần sự phức tạp thêm này.

Điều này có ảnh hưởng tới việc dùng bàn phím không?

Có thể, nên agent cần giữ quyền truy cập bằng bàn phím và hỗ trợ trình đọc màn hình hoạt động.

Làm sao biết cách này đã hiệu quả?

Skill khuyên đo độ mượt khi cuộn, mức dùng bộ nhớ và số phần tử trên trang trước và sau khi thay đổi.

Chi tiết

Mô tả gốc của tác giả

Use when reviewing dashboards, admin tables, search results, or feeds with many repeated items. Confirm the bottleneck is DOM or rendering cost before introducing virtualization because small lists usually do not need the added complexity.

repo: thedaviddias/Front-End-Checklist

Độ phổ biến

Sao GitHub
75k
Vị trí xếp hạng
#2924
Giấy phép
MIT
Cập nhật
31/10/2026

Skill này có hữu ích không?

0

Đăng nhập để bình chọn.

Bình luận

  • …

Thêm skill từ kho mã này

Skill tương tự