145-java-refactoring-high-performance

Featured

Use when you need to refactor Java code for high performance — including memory/allocation reduction, CPU hot-path optimization, and syntax/API/control-flow improvements. This should trigger for requests such as Review Java code for high performance; Optimize Java hot path; Reduce Java allocations; Improve Java latency/throughput. Part of Plinth Toolkit

Code & Development 423 stars 89 forks Updated today Apache-2.0

Install

View on GitHub

Quality Score: 93/100

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

Skill Content

# Java rules for High Performance Identify and apply practical Java high-performance techniques using a measure-first approach, with emphasis on allocation reduction, data layout, concurrency discipline, and evidence-based validation. **What is covered in this Skill?** - Measure-first workflow for Java code optimization - JVM/runtime-aware coding guidance - Allocation reduction techniques with bad/good patterns - CPU hot-path simplification and loop-level efficiency patterns - Concurrency/backpressure and timeout/cancellation discipline - I/O, parsing, and serialization efficiency patterns - Persistence/query and caching strategy guidance - Java-centric decision workflow: keep/revert based on measured impact **Scope:** Practical optimization in application code and APIs. Apply only where profiling indicates real bottlenecks. ## Constraints Performance optimization must be evidence-driven and safe, focused on Java code changes that preserve correctness and maintainability. - **MEASURE-FIRST**: Establish baseline behavior and identify Java code hot paths before optimization - **NO PREMATURE OPTIMIZATION**: Only optimize code paths identified by profiling evidence - **BEFORE APPLYING**: Read the relevant reference(s) for bad/good examples and measurement workflow - **EDGE CASE**: If hotspot evidence is unclear, ask clarifying questions before changing code ## When to use this skill - Review Java code for high performance - Optimize Java hot path - Reduce Java allocation...

Details

Author
jabrena
Repository
jabrena/plinth
Created
1 years ago
Last Updated
today
Language
Java
License
Apache-2.0

Integrates with

Bundled in these plugins

Similar Skills

Semantically similar based on skill content — not just same category

Code & Development Featured

141-java-refactoring-with-modern-features

Use when you need to refactor Java code to adopt modern Java features (Java 8+) — including migrating anonymous classes to lambdas, replacing Iterator loops with Stream API, adopting Optional for null safety, switching from legacy Date/Calendar to java.time, using collection factory methods, applying text blocks, var inference, or leveraging Java 25 features like flexible constructor bodies and module import declarations. This should trigger for requests such as Review Java code for modern Java development; Apply best practices for modern Java development in Java code; Modernize Java code with records pattern matching or switch expressions; Replace legacy idioms with modern Java features; Adopt Java 8+ language features safely. Part of Plinth Toolkit

423 Updated today
jabrena
AI & Automation Featured

122-java-type-design

Use when you need to review, improve, or refactor Java code for type design quality — including establishing clear type hierarchies, applying consistent naming conventions, eliminating primitive obsession with domain-specific value objects, leveraging generic type parameters, creating type-safe wrappers, designing fluent interfaces, ensuring precision-appropriate numeric types (BigDecimal for financial calculations), and improving type contrast through interfaces and method signature alignment. This should trigger for requests such as Review Java code for type design; Improve type design in Java code; Fix primitive obsession in Java code; Create value objects in Java code. Part of Plinth Toolkit

423 Updated today
jabrena
Data & Documents Featured

162-java-profiling-analyze

Use when you need to analyze Java profiling data collected during the detection phase — including interpreting flamegraphs, memory allocation patterns, CPU hotspots, threading issues, systematic problem categorization, evidence documentation with profiling-problem-analysis and profiling-solutions markdown files, or prioritizing fixes using Impact/Effort scoring. This should trigger for requests such as Analyze JFR profile; Analyze the profile; Analyze the performance; Analyze the memory; Analyze the threading; Analyze GC logs from profiling; Prioritize Java profiling bottlenecks by impact. Part of Plinth Toolkit

423 Updated today
jabrena