perf-core

Teach Python performance techniques for memory efficiency, caching, and query optimization.

1|Updated Dec 22, 2025
One-click install
npx skills add https://github.com/CybLow/pypaginate --skill perf-core-cyblow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: perf-core
Source: https://github.com/CybLow/pypaginate/tree/main/.opencode/skills/perf-core
Command: npx skills add https://github.com/CybLow/pypaginate --skill perf-core-cyblow

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Optimizes Python code performance by teaching practical techniques for lazy evaluation, caching, database query optimization, async patterns, and memory management.

Core Features & Use Cases

  • Lazy evaluation with generators to reduce memory usage and improve throughput
  • Caching strategies including lru_cache and application-level caching
  • Database query optimization to minimize N+1 queries and improve indexing
  • Async best practices and memory-conscious patterns

Quick Start

Run the included examples to apply lazy evaluation, caching, and database query optimization to a sample workload.

Frequently Asked Questions about perf-core

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

FAQPage Schema
How do I reduce memory usage in Python using lazy evaluation?

Lazy evaluation in Python reduces memory usage by processing data through generators instead of loading entire datasets into memory at once, improving throughput for backend workloads. The Skill teaches practical generator patterns to achieve this memory-efficient code.

What is the best way to fix N+1 queries in a Python backend?

Fixing N+1 queries in a Python backend requires database query optimization techniques that batch related queries and improve indexing strategies. The Skill provides actionable guidelines to minimize N+1 queries and optimize typical backend database interactions.

How does lru_cache work for Python caching strategies?

Python caching strategies using lru_cache store recently used function results to avoid redundant computations and improve response times. The Skill covers lru_cache implementation alongside application-level caching to optimize performance in backend workloads.

Can I optimize async patterns in Python for typical backend workloads?

Optimizing async patterns in Python for typical backend workloads is supported through best practices for concurrent memory management and database interactions. The Skill addresses async patterns specifically for improving backend workload performance.

When should I apply database query optimization techniques in Python?

Database query optimization in Python should be applied when backend workloads suffer from N+1 queries, poor indexing, or high memory overhead. The Skill provides a learning path from basic to advanced optimization techniques with actionable guidelines for these scenarios.