performance-smell-detection

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

700|137|Updated Jan 30, 2026
One-click install
npx skills add https://github.com/decebals/claude-code-java --skill performance-smell-detection
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-smell-detection
Source: https://github.com/decebals/claude-code-java/tree/main/.claude/skills/performance-smell-detection
Command: npx skills add https://github.com/decebals/claude-code-java --skill performance-smell-detection

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Detect potential performance issues in Java code early, focusing on streams, boxing, regex, collections, and string usage to prevent costly slow paths.

Core Features & Use Cases

  • Awareness of common performance smells in Streams, boxing/unboxing, regex, collections, and string operations.
  • Guidance on measuring and profiling first, with JVM version considerations to guide optimizations.
  • Use Case: during code reviews or hot-path refactors to surface expensive patterns and practical fixes.

Quick Start

Run a quick Java performance smells review on a hot path to surface obvious issues and actionable improvements.

Frequently Asked Questions about performance-smell-detection

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

FAQPage Schema
What are common Java performance smells to look for in a code review?

Common Java performance smells include unnecessary boxing and unboxing, regex compilation inside loops, stream overhead, and unneeded object creation. Identifying these patterns early during code reviews prevents costly slow paths in Java projects.

How do I identify Java performance pitfalls in streams and collections?

To identify Java performance pitfalls in streams and collections, review hot paths for stream overhead and unneeded object creation. Analyze code for expensive patterns and apply fixes based on modern JVM practices to optimize performance.

Why does compiling regex inside a loop cause performance issues in Java?

Compiling regex inside a loop causes performance issues in Java because it triggers unneeded object creation repeatedly. Moving regex compilation outside the loop avoids this performance smell and prevents costly slow paths during execution.

When should I optimize Java boxing and unboxing in hot paths?

You should optimize Java boxing and unboxing in hot paths during performance debugging or hot-path refactoring. Identifying and resolving these performance smells early prevents expensive slow paths and improves overall application responsiveness.

Does this Java performance analysis consider different JVM versions?

Yes, Java performance analysis considers different JVM versions. It provides guidance on measuring and profiling first, with JVM version considerations to guide optimizations and ensure recommendations align with modern JVM practices.