Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions plugins/sentry-skills/skills/django-perf-review/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,6 @@ If the answer to any is "no" - remove the finding.
- Tables with <1000 rows that won't grow
- Patterns in cold paths (rarely executed code)
- Micro-optimizations (exists vs count, only/defer without evidence)
- Missing select_related on single object fetches (2 queries vs 1 is not worth reporting)

### False Positives to Avoid

Expand All @@ -388,11 +387,11 @@ N+1 requires a loop that triggers additional queries. A single `list()` call is

**Missing select_related on single object fetch is not N+1:**
```python
# This is 2 queries, not N+1 - don't report it
# This is 2 queries, not N+1 - report as LOW at most
state = AutofixState.objects.filter(pr_id=pr_id).first()
project_id = state.request.project_id # second query
```
N+1 requires a loop. A single object doing 2 queries instead of 1 is a micro-optimization not worth reporting.
N+1 requires a loop. A single object doing 2 queries instead of 1 can be reported as LOW if relevant, but never as CRITICAL/HIGH.

**Style preferences are not performance issues:**
If your only suggestion is "combine these two lines" or "rename this variable" - that's style, not performance. Don't report it.