skillfed

django-perf-review

This skill audits Django applications for performance bottlenecks by researching your codebase and confirming issues before flagging them. It focuses on critical problems like N+1 queries in views and serializers, memory-exhausting unbounded querysets, and inefficient write patterns, while validating findings against actual data flow rather than pattern matching alone.

django-perf-review identifies and validates N+1 queries, unbounded querysets, and other performance issues in Django code through systematic codebase analysis.

AI-generated summary based on this skill's SKILL.md

891 46 Apache-2.0 updated by getsentry

Install

getsentry/skills/django-perf-review · repository language: Python

git clone https://github.com/getsentry/skills
cp -r skills/skills/django-perf-review ~/.claude/skills/django-perf-review
npx skillfed install getsentry/skills/django-perf-review

Frequently asked questions

AI-generated answers based on this skill's SKILL.md and metadata

How does django-perf-review find N+1 queries in Django?

django-perf-review identifies N+1 query problems in Django views and serializers by researching your codebase and confirming issues before flagging them. Rather than relying on pattern matching alone, it validates findings against actual data flow to ensure accuracy. This approach catches N+1 patterns that occur in real execution paths, not just syntactic red flags.

What performance issues can django-perf-review detect?

django-perf-review audits Django applications for multiple performance bottlenecks: N+1 queries in views and serializers, unbounded querysets causing memory exhaustion or OOM errors, missing database indexes on filtered or sorted fields, and inefficient write operations that could use bulk_create or bulk_update. It also performs broader codebase audits for performance anti-patterns at scale.

Can django-perf-review check queryset performance in my code?

Yes. django-perf-review analyzes querysets to find unbounded queries that exhaust memory, detect missing indexes on fields used in filters or sorts, and identify inefficient patterns. It validates each finding against your actual data flow before reporting, ensuring recommendations are grounded in real performance risks rather than false positives.

Does django-perf-review optimize Django ORM write operations?

django-perf-review detects opportunities to optimize write operations using bulk_create and bulk_update. It identifies places where your code performs inefficient individual writes that could be batched, helping reduce database round trips and improve throughput at scale.

How does django-perf-review audit Django code for performance?

django-perf-review performs a comprehensive audit of your Django codebase by researching views, serializers, and querysets to confirm performance anti-patterns before flagging them. It prioritizes critical issues like N+1 queries and memory exhaustion, validates findings against actual data flow, and provides actionable recommendations grounded in real bottlenecks rather than speculation.

What makes django-perf-review different from pattern matching tools?

django-perf-review goes beyond simple pattern matching by researching your codebase and validating performance issues against actual data flow before reporting them. This confirmation-first approach reduces false positives and ensures that flagged problems represent genuine bottlenecks in your Django application, not just syntactic red flags.

SKILL.md

rendered from the published skill — quoted content, verbatim

Django Performance Review

Review Django code for validated performance issues. Research the codebase to confirm issues before reporting. Report only what you can prove.

Review Approach

  1. Research first - Trace data flow, check for existing optimizations, verify data volume
  2. Validate before reporting - Pattern matching is not validation
  3. Zero findings is acceptable - Don't manufacture issues to appear thorough
  4. Severity must match impact - If you catch yourself writing "minor" in a CRITICAL finding, it's not critical. Downgrade or skip it.

Impact Categories

Issues are organized by impact. Focus on CRITICAL and HIGH - these cause real problems at scale.

Priority Category Impact
1 N+1 Queries CRITICAL - Multiplies with data, causes timeouts
2

(truncated - see the full file via the links below)

Read as markdown · JSON record · Browse the source repository

File tree — 2 files
skills/django-perf-review/LICENSE
skills/django-perf-review/SKILL.md

Related skills

Tags

query-optimization database-bottleneck orm-patterns memory-efficiency index-strategy bulk-operations lazy-evaluation request-scaling code-audit