performance

Solid

CLI performance optimization - startup time, memory usage, token savings benchmarking

AI & Automation 57,145 stars 3516 forks Updated yesterday Apache-2.0

Install

View on GitHub

Quality Score: 87/100

Stars 20%
100
Recency 20%
100
Frontmatter 20%
40
Documentation 15%
100
Issue Health 10%
50
License 10%
100
Description 5%
100

Skill Content

# Performance Optimization Skill Systematic performance analysis and optimization for RTK CLI tool, focusing on **startup time (<10ms)**, **memory usage (<5MB)**, and **token savings (60-90%)**. ## When to Use - **Automatically triggered**: After filter changes, regex modifications, or dependency additions - **Manual invocation**: When performance degradation suspected or before release - **Proactive**: After any code change that could impact startup time or memory ## RTK Performance Targets | Metric | Target | Verification Method | Failure Threshold | |--------|--------|---------------------|-------------------| | **Startup time** | <10ms | `hyperfine 'rtk <cmd>'` | >15ms = blocker | | **Memory usage** | <5MB resident | `/usr/bin/time -l rtk <cmd>` (macOS) | >7MB = blocker | | **Token savings** | 60-90% | Tests with `count_tokens()` | <60% = blocker | | **Binary size** | <5MB stripped | `ls -lh target/release/rtk` | >8MB = investigate | ## Performance Analysis Workflow ### 1. Establish Baseline Before making any changes, capture current performance: ```bash # Startup time baseline hyperfine 'rtk git status' --warmup 3 --export-json /tmp/baseline_startup.json # Memory usage baseline (macOS) /usr/bin/time -l rtk git status 2>&1 | grep "maximum resident set size" > /tmp/baseline_memory.txt # Memory usage baseline (Linux) /usr/bin/time -v rtk git status 2>&1 | grep "Maximum resident set size" > /tmp/baseline_memory.txt # Binary size baseline ls -lh target/release/rtk...

Details

Author
rtk-ai
Repository
rtk-ai/rtk
Created
4 months ago
Last Updated
yesterday
Language
Rust
License
Apache-2.0

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category