shirazi-java-performance

Applies Shirazi's measurement-driven frameworks for profiling and tuning Java application performance.

Updated Jul 28, 2026
One-click install
npx skills add https://github.com/zademy/book-to-skill-zademy --skill shirazi-java-performance-zademy
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: shirazi-java-performance
Source: https://github.com/zademy/book-to-skill-zademy/tree/main/.agents/skills/shirazi-java-performance
Command: npx skills add https://github.com/zademy/book-to-skill-zademy --skill shirazi-java-performance-zademy

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Java applications are often slow not because of the language but because they are untuned, and developers frequently optimize the wrong code based on intuition. This Skill provides the measurement-driven tuning methodology, frameworks, and chapter-level knowledge from Jack Shirazi's "Java Performance Tuning" so you can find real bottlenecks and fix them systematically. ## Core Features & Use Cases - Measurement-First Tuning Loop: Guides profiling, bottleneck identification, single-change fixes, and re-measurement, with Amdahl's Law used to prioritize the largest bottleneck. - Topic and Chapter Navigation: Jump directly to 14 chapter summaries covering profiling tools, object creation, strings, loops, I/O and serialization, sorting, threading, data structures, distributed calls, and OS/network tuning. - Quick-Reference Aids: A cheatsheet with decision rules and thresholds, a glossary of terms, and a patterns catalog of reusable techniques with trade-offs. - Use Case: When a Java service is slow, ask how to profile it and which bottleneck to fix first; the Skill points you to sampling profilers, object-creation analysis, and the relevant chapter technique such as buffering I/O or presizing collections. ## Quick Start Ask how to diagnose and fix a specific Java performance problem, such as slow serialization or lock contention, and follow the referenced chapter guidance.

Frequently Asked Questions about shirazi-java-performance

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

FAQPage Schema
How do I find performance bottlenecks in a Java application?▼

Use a sampling profiler to rank methods by percentage of total time, then target the top 5-10 methods and fix the quickest-to-fix first. Re-profile after each change since rankings reshuffle, and use System.currentTimeMillis() for absolute timing rather than profiler-reported times.

How to speed up slow Java I/O and serialization?▼

Buffer every stream, since unbuffered I/O is the most common severe bottleneck, with roughly an order of magnitude improvement and diminishing returns beyond about 8 KB buffers. For hot serialization paths, implement Externalizable instead of Serializable and consider lazy deserialization.

Should I use object pooling to improve Java performance?▼

Object pooling only pays off for genuinely expensive-to-create objects like connections and threads. For cheap short-lived objects, modern generational garbage collection makes allocate-and-discard faster than pooling, which adds contention and bug surface.

Is this Java performance advice still relevant for modern JDKs?▼

The measurement discipline, bottleneck prioritization, and buffering/caching principles remain valid, but many micro-optimizations are now handled by modern JITs and generational GC. Each chapter carries an era caveat flagging dated assumptions, and numeric claims should be re-verified on your target VM.

What topics are out of scope for this Java tuning knowledge base?▼

It does not cover the Java 5+ memory model, G1/ZGC collectors, java.util.concurrent, JMH microbenchmarking, reactive frameworks, or cloud/container tuning. The content is grounded in the JDK 1.1-1.3 era with methodology that transfers but numbers that may not.