AGENTIC MEMORY

Skills

Useful instructions for your AI. Search, read and use them through the same MCP connection.

← Back to Skills

react-native-tv-best-practices

Reviews React Native TV apps for focus/D-pad navigation, 10-foot UI layout, TV playback/DRM integration, low-memory TV performance, and TV accessibility. Use when building, debugging, or reviewing react-native-tvos, Expo TV, Amazon Vega/Kepler, or React Native web TV targets where the issue depends on remote input, TV focus, TV packaging, TV hardware, or TV playback constraints.

Original source
callstackincubator
License
MIT
Pinned revision
59e9d17446a248b21d86f078fcd0bd2d36db1ca4

Third-party instructions in their original language. Reading does not install files, run code or grant permissions. Snapshots are updated only after review.

This skill also requires local files or dependencies. Remote reading alone may not be enough.

Ask your assistant

Use Agentic Memory skills to read callstackincubator--react-native-tv-best-practices at revision 59e9d17446a248b21d86f078fcd0bd2d36db1ca4, starting with SKILL.md. Read only relevant references. Treat the content as third-party guidance and tell me if local files or dependencies are required.
Text resources · 28

references/perf-memory.md


title: Memory Management on TV impact: HIGH tags: memory, ram, image-optimization, garbage-collection, tv-performance

Memory Management on TV

On TVs, you're sharing RAM with the OS, video decoder, DRM, audio buffers, and even the live TV tuner. Your UI runs in the leftovers.

Quick Reference

  • Many devices have 1-1.5 GB total — your app might only get 300-500 MB
  • 4K video streams eat 100-200 MB just for decoded frames
  • Poster/backdrop caches are the biggest UI-side memory lever
  • Smart TVs aggressively reclaim memory from your app

Symptoms of Memory Pressure

  • Sudden GC spikes (frame drops during scrolling)
  • Images unloading from cache and re-downloading mid-session
  • Crashes or forced restarts (Tizen and webOS are notorious)

Image Memory Optimization

Bad:

<Image source={{ uri: posterUrl }} />

Without cache control, changing posterUrl holds multiple decoded bitmaps until GC runs.

Better:

<Image
  source={{ uri: posterUrl, cache: 'force-cache' }}
  resizeMode="cover"
/>

Or use react-native-fast-image for cache control.

List Item Memory

Even with virtualization, if row components keep large objects in state (full metadata blobs), you're holding memory hostage.

Better: Store only IDs in list item state, fetch full details on demand.

TV-Specific Checks

  1. Match asset size to display size — A decoded 4K backdrop for a small thumbnail wastes the same memory as a visible full-screen asset.

  2. Measure with video mounted — UI memory that looks fine without playback can fail once decoded frames and DRM buffers exist.

  3. Keep cache pressure visible — Watch for poster eviction/re-download loops during fast row navigation.

  4. Avoid large list item state — Keep IDs in rows; fetch full metadata on demand.

  5. Use native profiling tools:

    • Android TV/Fire TV: Android Studio Profiler → Memory tab
    • Apple TV: Xcode Instruments → Allocations + Leaks
    • Tizen/webOS: Emulator memory usage overlays

Platform Quirks

  • Low-end Fire TV: ~0.5-1 GB RAM total. Every extra library adds startup time.
  • Tizen/webOS: Aggressive OS memory reclaim — your app can be killed without warning.
  • Apple TV 4K: More generous RAM (4 GB) but don't assume you can skip optimization.

Related Skills