perf-virtual-lists_skill

This skill optimizes performance for virtualized lists on Android TV by applying React Window techniques and overscan, ensuring smooth 60FPS.
  • JavaScript

0

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill dbobkov245-source/pwa-torserve --skill perf-virtual-lists

  • SKILL.md3.1 KB

Overview

This skill specializes in high-performance list virtualization for Android TV apps built with React. It focuses on delivering smooth 60FPS scrolling on low-end TV boxes by using lightweight virtualization, TV-specific optimizations, and predictable layout strategies. The guidance targets movie and episode grids where large datasets and fast directional navigation are common.

How this skill works

It uses react-window with react-virtualized-auto-sizer to render only visible cells and a small overscan buffer, minimizing DOM nodes and paint work. The approach enforces fixed item sizes, lazy image loading, and a focus-index-driven navigation model so focus remains stable even when items unmount off-screen. Combined, these tactics avoid layout thrashing and preserve responsiveness on constrained TV hardware.

When to use it

  • Large collections of posters or tiles (hundreds to thousands) in Android TV UIs.
  • Layouts where users navigate quickly via D-pad (holding Down/Up).
  • Cases where consistent 60FPS is required on low-memory TV boxes (e.g., 1GB RAM).
  • Grid or list layouts where item dimensions can be fixed ahead of time.
  • When image-heavy cards risk causing layout shifts during scroll.

Best practices

  • Prefer FixedSizeList or FixedSizeGrid; avoid variable-size virtualization to prevent per-frame layout recalculation.
  • Set overscanRowCount/overscanCount to at least 2–3 rows for TV to avoid blank regions during fast scrolls.
  • Manage focus by tracking a focusedIndex in JS (useTVNavigation pattern) rather than relying on document.activeElement.
  • Give images explicit width and height, use loading="lazy" or a FadeInImage that sets src only when inView.
  • Keep item components lightweight: avoid heavy CSS effects and inline render functions; hoist renderers where possible.

Example use cases

  • A movie grid showing thousands of posters where users navigate with a remote and expect instant responsiveness.
  • An episode list with fixed-height rows and fast vertical paging where overscan prevents blank frames.
  • A home screen carousel of recommended content using FixedSizeGrid to maintain smooth D-pad scrolling.
  • A NAS media browser with image-heavy tiles that uses lazy loading and fixed sizes to avoid layout shifts.

FAQ

react-virtualized is heavier and variable sizes force expensive layout work per frame, which kills performance on older TV hardware. Fixed-size virtualization is far more predictable and efficient.

How do I prevent focus from being lost when items unmount?

Don’t rely on DOM focus. Track focusedIndex in state via your TV navigation hook and re-apply focus when the item remounts or render it with an isFocused prop so it appears focused without requiring document.activeElement.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational