perf

Featured

Analyze Elixir/Phoenix performance — N+1 queries, assign bloat, ecto optimization, genserver bottlenecks. Use when slowness, timeouts, or high memory reported.

AI & Automation 507 stars 35 forks Updated yesterday MIT

Install

View on GitHub

Quality Score: 94/100

Stars 20%
90
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Performance Analysis Analyze code for performance issues across Ecto, LiveView, and OTP layers. Prioritize findings by impact and effort. ## Usage ``` /phx:perf # Analyze full project /phx:perf lib/my_app/accounts.ex # Analyze specific module /phx:perf --focus ecto # Ecto queries only /phx:perf --focus liveview # LiveView memory only /phx:perf --focus otp # OTP bottlenecks only ``` ## Arguments `$ARGUMENTS` = Optional module/context path and `--focus` flag. ## Iron Laws 1. **MEASURE BEFORE OPTIMIZING** — Never optimize without evidence of a problem 2. **DATABASE FIRST** — 90% of Elixir performance issues are query-related 3. **ONE CHANGE AT A TIME** — Isolate optimizations to measure impact 4. **NEVER benchmark in dev mode** — Always use `MIX_ENV=prod` for performance measurements; dev mode includes code reloading, debug logging, and unoptimized compilation that invalidate results ## Workflow ### Step 1: Identify Scope Check specific file if provided. Otherwise scan full project: ```bash # Find hot paths: contexts, LiveViews, workers find lib/ -name "*.ex" | head -50 ``` ### Step 2: Run Analysis Tracks Spawn analysis agents in parallel based on focus: **Ecto Track** (default or `--focus ecto`): Spawn `phx:elixir-reviewer` with prompt: "Analyze for N+1 queries, missing preloads, unindexed queries, and inefficient patterns. Check: `Repo.all` in loops, `Enum.map` with Repo calls, missing `preload`,...

Details

Author
oliver-kriska
Repository
oliver-kriska/claude-elixir-phoenix
Created
5 months ago
Last Updated
yesterday
Language
Python
License
MIT

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category