performance-check

Reviews code changes against performance checklists covering databases, APIs, rendering, caching, and concurrency.

1.6k|221|Updated Oct 28, 2025
One-click install
npx skills add https://github.com/ZeroDeng01/sublinkPro --skill performance-check-zerodeng01
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-check
Source: https://github.com/ZeroDeng01/sublinkPro/tree/main/.agents/skills/performance-check
Command: npx skills add https://github.com/ZeroDeng01/sublinkPro --skill performance-check-zerodeng01

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Code changes that touch queries, APIs, rendering, or algorithms often introduce hidden performance regressions like N+1 queries, goroutine leaks, or unbounded caches. This Skill provides a structured review checklist so these issues are caught before merge. ## Core Features & Use Cases - Eight-Domain Checklist: Covers database queries, API responses, frontend rendering, caching, concurrency, memory, network, and algorithm complexity. - Detailed Reference Guides: Each checklist section links to an in-depth guide with Go and React code examples showing violations and fixes. - Testing & Monitoring Guidance: Includes benchmark commands (go test -bench, pprof), k6 load testing, and Lighthouse performance budgets. - Use Case: After modifying a node list API endpoint in a Go/Gin backend, run this review to verify pagination, DTO field filtering, gzip compression, and absence of queries inside loops. ## Quick Start Review my recent changes to the node list endpoint for performance issues using the performance check checklist.

Frequently Asked Questions about performance-check

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I review Go code for performance issues before merging?

Use a structured checklist covering N+1 queries, queries in loops, missing pagination, goroutine leaks, and unbounded caches. Then validate with go test -bench for benchmarks and pprof for CPU and memory profiling.

How to fix N+1 query problems in GORM?

Use GORM's Preload to eager load associations, reducing N+1 queries to two queries total. Also replace per-item queries inside loops with a single Where id IN clause, and add indexes on frequently filtered columns.

When should I use React.memo and useMemo for rendering optimization?

Apply React.memo to components that re-render unnecessarily when parent state changes, and useMemo for expensive computations like date formatting. For lists over 100 items, use virtualization with react-window instead of memoization alone.

How do I detect goroutine leaks in Go services?

Compare runtime.NumGoroutine before and after test execution to spot leaks. Prevent them by passing context to producer goroutines, calling cancel via defer, and building with the -race flag to catch race conditions.

What load testing tools work for Go API endpoints?

Apache Bench (ab -n 1000 -c 10) handles simple load tests, while k6 scripts support virtual users, duration control, and response time assertions. Both verify endpoints meet latency targets like sub-500ms responses.

When is a performance review checklist not needed?

Skip the full review for simple configuration changes that do not touch queries, APIs, rendering, caching, or algorithms. The checklist targets changes with real performance impact, not cosmetic or config-only edits.