Loading...
Loading...
Scans code for performance and scalability issues — N+1 queries, missing indexes, unbounded queries, memory inefficiencies, caching gaps, algorithmic complexity, concurrency bugs, and frontend performance problems. Generates severity-scored findings with copy-pasteable fix prompts. Trigger phrases: "performance audit", "performance check", "N+1 detection", "query optimization", "slow code", "performance review".
npx skill4agent add nishilbhave/codeprobe-claude codeprobe-performance../codeprobe/shared-preamble.md../codeprobe/references/full| ID Prefix | What to Detect | How to Detect | Severity |
|---|---|---|---|
| Eloquent relationship access inside loop without eager loading | Search for | Critical |
| Any ORM lazy-loading inside iteration | Look for patterns where a database query is implicitly triggered inside a loop: Django querysets accessed per-iteration, SQLAlchemy lazy loads, Prisma relation access in | Critical |
| Template/view triggering queries | Blade templates, Jinja2 templates, or React components calling relationship properties that trigger queries during rendering. | Major |
| ID Prefix | What to Detect | How to Detect | Severity |
|---|---|---|---|
| WHERE/ORDER BY on non-indexed columns | Cross-reference query conditions ( | Major |
| Foreign keys without indexes | Check migration files for | Minor |
| Composite queries needing compound indexes | Multiple | Minor |
| ID Prefix | What to Detect | How to Detect | Severity |
|---|---|---|---|
| | Search for | Major |
| Missing cursor/chunk for large dataset processing | Operations that | Major |
| ID Prefix | What to Detect | How to Detect | Severity |
|---|---|---|---|
| Loading entire files into memory | | Major |
| Array accumulation in loops | Arrays that grow inside loops without bounds or cleanup — collecting results in memory that could be streamed or yielded. | Minor |
| Large collections instead of generators | Returning full arrays/lists where generators ( | Minor |
| ID Prefix | What to Detect | How to Detect | Severity |
|---|---|---|---|
| Repeated identical queries in same request | Same query pattern executed multiple times within a single request/function call without caching the result. | Minor |
| Cache without TTL | | Minor |
| Cache not invalidated after writes | Write operations (create/update/delete) that don't clear or update related cache entries. Stale cache served after mutation. | Major |
| ID Prefix | What to Detect | How to Detect | Severity |
|---|---|---|---|
| O(n^2) or worse in hot paths | Nested loops iterating over the same or related collections. | Major |
| Sorting inside loops | | Major |
| Hashmap-replaceable linear search | | Minor |
| ID Prefix | What to Detect | How to Detect | Severity |
|---|---|---|---|
| Race conditions in read-modify-write | Patterns that read a value, modify it, and write back without locking: incrementing counters, updating balances, toggling flags in concurrent contexts. | Critical |
| Queue jobs without idempotency | Queue/job handlers that don't check for duplicate execution. Jobs that create resources without checking if already created. Missing unique constraints on job-created data. | Major |
| Shared mutable state in async contexts | Global/module-level mutable variables accessed in async handlers, request-scoped data stored in module scope. | Major |
| ID Prefix | What to Detect | How to Detect | Severity |
|---|---|---|---|
| Unnecessary re-renders | Missing | Minor |
| Large bundle imports | | Minor |
| Missing lazy loading | No | Minor |
scripts/complexity_scorer.py/codeprobe health/codeprobe auditPERF-PERF-001PERF-002OrderController@index->with('items', 'customer')Order::query()orders/index.blade.php:15Product::all()CatalogService.phpProduct::query()->paginate(25)Product::cursor()ReportGenerator@aggregate$orders$customers$ordersByCustomerId = collect($orders)->groupBy('customer_id')import _ from 'lodash'src/utils/helpers.tsimport debounce from 'lodash/debounce'