home / skills / harborgrid-justin / lexiflow-premium / react-compiler-optimization-profiles
/frontend/.github-skills/react-compiler-optimization-profiles
This skill helps you optimize React Compiler profiles by tuning memoization, reducing manual useMemo, and improving cold-start performance.
npx playbooks add skill harborgrid-justin/lexiflow-premium --skill react-compiler-optimization-profilesReview the files below or copy the command above to add this skill to your agents.
---
name: react-compiler-optimization-profiles
description: Deep dive into the React Compiler (formerly React Forget) to tune automatic memoization and optimization profiles.
---
# React Compiler Optimization Profiles
## Summary
Deep dive into the React Compiler (formerly React Forget) to tune automatic memoization and optimization profiles.
## Key Capabilities
- Analyze compiler output to verify memoization boundaries.
- Identify distinct optimization de-opt bailouts.
- Configure compiler passes for specific code patterns.
## PhD-Level Challenges
- Quantify the overhead of compiler-injected memoization slots.
- Construct cases where manual memoization outperforms the compiler.
- Analyze the impact of compiler optimizations on cold-start time.
## Acceptance Criteria
- Provide compilation reports for critical components.
- Demonstrate a reduction in manual `useMemo` usage.
- Document de-optimization triggers discovered.
This skill provides a focused toolkit for analyzing and tuning the React Compiler’s automatic memoization and optimization profiles. It helps teams validate memoization boundaries, surface de-optimization causes, and configure compiler passes to match real-world code patterns. The outcome is clearer optimization reports and fewer unnecessary manual memo calls.
The skill inspects compiler output and generated IR to identify where the compiler inserts memoization slots and optimization guards. It highlights distinct bailout reasons and correlates them with source patterns. It also offers configuration guidance to adjust compiler passes for targeted components and produces compilation reports for measurable changes.
Will this replace manual performance profiling?
No. This skill complements runtime profiling by inspecting compiler decisions and showing where compile-time hooks affect runtime behavior.
Do changes require rebuilding the whole app?
Compiler pass tweaks should be tested on targeted builds; full rebuilds are needed to validate global effects but start with focused components.
Can the compiler always eliminate manual useMemo?
Not always. The compiler can replace many patterns but some cases still benefit from explicit memoization; the skill helps quantify those cases.