skillZs
★ LIVE SKILL TAGS ★
>>> LIVE SKILLS INDEX <<<
* OPEN SOURCE *
NO LOGIN, NO TRACKING
※ REAL INSTALL DATA ※
← back to all skills
onekeyhq/app-monorepo63 installs

1k-performance

Performance optimization for React/React Native — re-renders, memoization, FlashList, memory leaks, and bundle size.

How do I install this agent skill?

npx skills add https://github.com/onekeyhq/app-monorepo --skill 1k-performance
view source ↗

Is this agent skill safe to install?

  • Gen Agent Trust Hubpass

    This skill is a documentation-only resource providing performance optimization guidelines for React and React Native applications. It contains no executable scripts, requires only read-only tools, and follows secure patterns.

  • Socketpass

    No alerts

  • Snykpass

    Risk: LOW · No issues

  • Runlayerwarn

    2/2 files flagged

What does this agent skill do?

OneKey Performance Optimization

Performance optimization patterns and best practices for React/React Native applications in the OneKey monorepo.

Quick Reference

CategoryKey OptimizationWhen to Use
Concurrent RequestsLimit to 3-5, use executeBatchedMultiple API calls, network-heavy operations
Bridge OptimizationMinimize crossings, batch dataReact Native bridge overhead, iOS/Android
List RenderingFlashList, windowSize={5}, content-visibilityLists with 100+ items
Memoizationmemo, useMemo, useCallbackExpensive computations, prevent re-renders
Heavy OperationsInteractionManager, setTimeoutUI blocking operations

Critical Performance Rules

❌ FORBIDDEN: Too Many Concurrent Requests

// ❌ BAD - Can freeze UI with 15+ requests
const requests = items.map(item => fetchData(item));
await Promise.all(requests);

✅ CORRECT: Batched Execution with Concurrency Limit

async function executeBatched<T>(
  tasks: Array<() => Promise<T>>,
  concurrency = 3,
): Promise<Array<PromiseSettledResult<T>>> {
  const results: Array<PromiseSettledResult<T>> = [];
  for (let i = 0; i < tasks.length; i += concurrency) {
    const batch = tasks.slice(i, i + concurrency);
    const batchResults = await Promise.allSettled(
      batch.map((task) => task()),
    );
    results.push(...batchResults);
  }
  return results;
}

const tasks = items.map(item => () => fetchData(item));
await executeBatched(tasks, 3); // Max 3 concurrent

🚨 Built-in Optimizations

Already Optimized - NO ACTION NEEDED:

ComponentOptimizationDetails
ListViewwindowSize={5}Auto-limits visible items
TabscontentVisibility: 'hidden'Hides inactive tabs
DialogcontentVisibility: 'hidden'Hides when closed

Detailed Guide

For comprehensive performance optimization strategies, see performance.md.

Topics covered:

  • Concurrent request control
  • React Native bridge optimization
  • Heavy operations offloading
  • List rendering (windowSize, FlashList, content-visibility)
  • Memoization & callbacks
  • State updates optimization
  • Image optimization
  • Async operations & race conditions
  • Real-world iOS AppHang case study

Related Skills

  • /1k-coding-patterns - General coding patterns and conventions
  • /1k-sentry - Sentry error analysis (includes performance issues)

Add the canonical catalog link to the repository README so users can inspect current installs and available audits. The publishing guide covers the complete discovery path.

<a href="https://skillzs.dev/skills/onekeyhq/app-monorepo/1k-performance">View 1k-performance on skillZs</a>