performance

Guide JVM tuning, garbage collection, and performance analysis for Java 21+ applications.

4|2|Updated Dec 28, 2025
One-click install
npx skills add https://github.com/lazygophers/ccplugin --skill performance-lazygophers
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance
Source: https://github.com/lazygophers/ccplugin/tree/main/plugins/languages/java/skills/performance
Command: npx skills add https://github.com/lazygophers/ccplugin --skill performance-lazygophers

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill addresses the critical need for optimizing Java application performance by providing guidance on JVM tuning, garbage collection, and performance analysis techniques.

Core Features & Use Cases

  • JVM Parameter Configuration: Recommends essential JVM flags for memory management and garbage collector selection (ZGC, G1GC).
  • Performance Profiling: Details how to use Java Flight Recorder (JFR) and command-line tools like jcmd and jstat for in-depth analysis.
  • Code Optimization: Offers practical Java code snippets for common performance pitfalls like string concatenation and collection initialization.
  • Use Case: A developer is experiencing high latency in their Java microservice. They can use this Skill to identify the bottleneck, tune JVM parameters, and implement code-level optimizations to improve response times.

Quick Start

Apply the recommended JVM parameters for ZGC and set the heap size to 2 gigabytes for the Java application.

Frequently Asked Questions about performance

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

FAQPage Schema
How do I tune JVM parameters to reduce high latency in a Java microservice?

Tune JVM parameters by selecting garbage collectors like ZGC or G1GC and configuring heap size to reduce high latency in Java microservices. This Skill recommends essential JVM flags for memory management and improved response times.

What is the best way to profile Java application performance bottlenecks?

Profile Java application performance bottlenecks using Java Flight Recorder (JFR) and command-line tools like jcmd and jstat. These tools provide in-depth analysis to identify performance issues within Java 21+ environments.

How does garbage collection selection impact Java application optimization?

Garbage collection selection impacts Java application optimization by determining memory reclamation efficiency. Choosing between strategies like ZGC and G1GC directly affects pause times and overall application throughput.

Can I use this Skill to fix common Java code performance pitfalls?

Yes, you can use this Skill to fix common Java code performance pitfalls. It offers practical Java code snippets addressing issues like inefficient string concatenation and suboptimal collection initialization for improved efficiency.

When do I need to adjust the heap size for my Java application?

Adjust the heap size for your Java application when experiencing high latency or memory bottlenecks. Configuring the heap size, such as setting it to 2 gigabytes, directly influences garbage collection behavior and overall performance.

Does this guidance apply to Java 21 and newer environments?

Yes, this guidance applies to Java 21 and newer environments. It specifically addresses performance bottlenecks and optimization patterns tailored for Java 21+ environments, ensuring relevant JVM tuning strategies.