performance-smell-detection

Identify Java performance smells in streams, boxing, regex, and collections.

1|Updated May 30, 2025
One-click install
npx skills add https://github.com/mzffreyvazov/yt-to-spotify2 --skill performance-smell-detection-mzffreyvazov
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-smell-detection
Source: https://github.com/mzffreyvazov/yt-to-spotify2/tree/main/.agents/skills/performance-smell-detection
Command: npx skills add https://github.com/mzffreyvazov/yt-to-spotify2 --skill performance-smell-detection-mzffreyvazov

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Identify potential code-level performance smells in Java to help developers spot inefficiencies without blindly optimizing.

Core Features & Use Cases

  • Scans Java code for common performance smells in streams, boxing, regex usage, and collection handling.
  • Provides context-aware guidance and safe-guarded recommendations, emphasizing measurement via profiling.
  • Useful for code reviews, teaching Java performance patterns, and preparing performance-focused refactors.

Quick Start

Analyze a Java code sample to surface probable performance smells and suggested profiling steps.

Frequently Asked Questions about performance-smell-detection

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

FAQPage Schema
How do I identify Java performance smells in my code?

To identify Java performance smells, scan your codebase for common inefficiencies in streams, boxing, regex usage, and collection handling. This analysis highlights probable hot paths and recommends profiling steps to guide safe optimization without automated fixes.

What are common Java performance smells in streams and boxing?

Common Java performance smells include excessive autoboxing in streams and inefficient collection handling. These inefficiencies often create hidden hot paths that require measurement data from profiling tools to validate before applying any safe optimizations.

Do I need profiling data to check for Java performance smells?

Yes, you need measurement data from profiling tools to accurately check Java performance smells. The review identifies potential code-level inefficiencies, but profiling data is required to confirm hot paths and ensure responsible optimization.

Can I use this to find regex performance issues in modern Java applications?

Yes, you can scan modern Java applications to find regex performance issues along with streams, boxing, and collection smells. It provides context-aware guidance and best-practice recommendations to help developers assess hot paths during code reviews.

What is the best way to optimize Java code without blind refactoring?

The best way to optimize Java code without blind refactoring is to identify potential performance smells first, then validate them using measurement data from profiling tools. This ensures you apply safe, best-practice recommendations rather than guessing.

Are there limitations to detecting Java performance smells automatically?

Yes, a key limitation is that detecting Java performance smells provides guidance only and does not perform automated fixes. Developers must use measurement data from profiling tools to validate hot paths and apply optimizations responsibly.