performance

Optimize Supabase queries and React rendering to reduce re-renders and network calls.

Updated Apr 16, 2026
One-click install
npx skills add https://github.com/jjmendezrodriguez/jm-claude-plugin --skill performance-jjmendezrodriguez
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance
Source: https://github.com/jjmendezrodriguez/jm-claude-plugin/tree/main/skills/performance
Command: npx skills add https://github.com/jjmendezrodriguez/jm-claude-plugin --skill performance-jjmendezrodriguez

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you eliminate common causes of slowness—slow Supabase queries, excessive network calls, and avoidable React re-renders—so your app responds faster and feels more responsive.

Core Features & Use Cases

  • Supabase query optimization: Select only required columns, paginate with .range(), avoid N+1 queries via joins, and use indexes for frequently queried fields.
  • API & network best practices: Reduce unnecessary polling and over-fetching, paginate list endpoints, and choose caching and realtime strategies intentionally.
  • React rendering performance: Apply lazy loading, memoize expensive derived values with useMemo, stabilize callbacks with useCallback, and use React.memo() where it measurably helps.
  • Input event control: Use debounce for user-driven actions (like search) and throttle for continuous events (like scroll/resize).

Quick Start

Use the performance skill to diagnose why a React + Supabase screen is slow, then refactor the Supabase queries and React rendering patterns to reduce over-fetching, prevent N+1 queries, and cut unnecessary re-renders.

Frequently Asked Questions about performance

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I optimize slow Supabase queries in a React app?

Reduce unnecessary React re-renders by applying lazy loading, memoizing expensive derived values with `useMemo`, stabilizing callbacks with `useCallback`, and using `React.memo()` where it measurably helps rendering performance.

When should I use debounce vs throttle for input events?

Prevent N+1 queries in Supabase by using join-based data fetching strategies instead of looping individual requests, which avoids excessive network calls and significantly improves perceived app speed on list pages.

What is the best way to reduce unnecessary React re-renders?

Reduce unnecessary React re-renders by applying lazy loading, memoizing expensive derived values with `useMemo`, stabilizing callbacks with `useCallback`, and using `React.memo()` where it measurably helps rendering performance.

When should I use debounce vs throttle for input events?

Use debounce for user-driven actions like search inputs to delay execution until typing stops, and throttle for continuous events like scroll or resize to limit execution frequency and reduce excessive API calls.

How do I avoid N+1 queries when fetching related Supabase records?

Prevent N+1 queries in Supabase by using join-based data fetching strategies instead of looping individual requests, which avoids excessive network calls and significantly improves perceived app speed on list pages.