performance-optimization

Profile code to identify and resolve performance bottlenecks with benchmarks.

10|Updated Sep 26, 2024
One-click install
npx skills add https://github.com/Harvest-Forged-Code/Analyser --skill performance-optimization-harvest-forged-code
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-optimization
Source: https://github.com/Harvest-Forged-Code/Analyser/tree/main/.claude/skills/performance-optimization
Command: npx skills add https://github.com/Harvest-Forged-Code/Analyser --skill performance-optimization-harvest-forged-code

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) and scripts (resource) components.

What problem does it solve?

This Skill addresses slow application performance by systematically identifying, categorizing, and resolving bottlenecks in code, ensuring efficient resource utilization and improved user experience.

Core Features & Use Cases

  • Bottleneck Identification: Pinpoints performance issues across CPU, I/O, database queries, and memory usage.
  • Targeted Optimization: Provides specific strategies for each bottleneck category, including async patterns, caching, query optimization, and memory reduction.
  • Benchmarking & Testing: Enforces before/after benchmarks and regression tests to validate improvements and prevent reintroduction of issues.
  • Use Case: A web application is experiencing high latency on its reporting endpoint. This Skill can be used to profile the endpoint, identify that slow database queries are the cause, and apply indexing or eager loading techniques to resolve the issue, with tests to ensure the fix is permanent.

Quick Start

Use the performance-optimization skill to profile and optimize the slow database queries in the user profile endpoint.

Frequently Asked Questions about performance-optimization

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

FAQPage Schema
How do I identify and resolve performance bottlenecks in my code?

To resolve performance bottlenecks, you profile the code to pinpoint issues across CPU, database queries, I/O, and memory, then apply targeted optimization techniques like caching or async patterns.

What is the best way to optimize slow database queries causing high latency on endpoints?

Optimizing slow database queries causing high latency involves profiling the endpoint to identify the bottleneck, then applying targeted techniques like indexing or eager loading to resolve the issue.

How does profiling help with reducing high memory and CPU usage?

Profiling helps reduce high memory and CPU usage by categorizing resource bottlenecks, enabling the application of specific memory reduction and CPU optimization strategies for efficient resource utilization.

Do I need before and after benchmarks for code optimization?

Yes, before and after benchmarks are required for code optimization to validate performance improvements and prevent the reintroduction of issues, alongside mandatory regression tests.

Can I use this approach to fix slow startup and slow batch jobs?

Yes, this approach fixes slow startup and slow batch jobs by systematically identifying and categorizing performance bottlenecks, then applying targeted optimization techniques to improve execution speed.