1.3 KiB
1.3 KiB
name, description
| name | description |
|---|---|
| python-performance-adrs | Python performance ADRs and rules. Load this when writing or refactoring performance-sensitive Python code (CLI tools, data pipelines, DB/async boundaries, JSON, etc.). |
Python Performance ADRs (Skill)
Use this skill when:
- Implementing new Python components.
- Refactoring hot paths, imports, async boundaries.
- Touching JSON, DB, collections, string formatting, or error handling.
How to use
- Always load:
- RULEBOOK.md (concise rules, always valid)
- For deeper context, load only the relevant paper:
- papers/async-overhead.md
- papers/collection-membership.md
- papers/json-serialization.md
- papers/exception-flow.md
- papers/string-formatting.md
- papers/memory-slots.md
- papers/import-optimization.md
- papers/database-patterns.md
Rules (summary)
- Prefer sync over async unless you truly need concurrency.
- Use sets for membership checks on large collections.
- Use orjson for high-volume JSON where possible.
- Avoid expensive exception paths in hot loops.
- Use f-strings for formatting.
- Use slots in high-volume objects.
- Be cautious with many imports in CLI / startup paths.
- Treat SQLite writes as a potential bottleneck.
All details are enforced via RULEBOOK.md; never reinvent these patterns.