performance-optimization

Profile and optimize hot paths in Spring Boot 4 JVM applications with SLO-driven criteria.

50|7|Updated Apr 18, 2026
One-click install
npx skills add https://github.com/loiane/specs-driven-development-spring-angular --skill performance-optimization-loiane
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-optimization
Source: https://github.com/loiane/specs-driven-development-spring-angular/tree/main/.windsurf/skills/performance-optimization
Command: npx skills add https://github.com/loiane/specs-driven-development-spring-angular --skill performance-optimization-loiane

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Performance regressions in Spring Boot 4 / JVM apps are hard to diagnose and fix without a clear signal. This skill provides a disciplined approach to measure with profiling, tuning, and validating improvements against SLOs, targeting antipatterns like N+1 queries, unbounded collections, HikariCP sizing, virtual-thread pinning, caching, and GC behavior.

Core Features & Use Cases

  • Profiling toolchain: async-profiler, JFR, JMH for CPU, memory, and microbenchmark measurements.
  • SLO-driven optimization: tied to service level objectives to guide improvements and verify impact.
  • Anti-pattern detection: flags common performance antipatterns in diffs (N+1, pagination issues, connection pool sizing) during plan/review.

Quick Start

Run a profiling-first workflow on a hot path in your Spring Boot 4 app to produce before/after metrics.

Frequently Asked Questions about performance-optimization

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

FAQPage Schema
How do I optimize Spring Boot hot paths using profiling tools?

To optimize Spring Boot hot paths, establish measurable performance baselines using async-profiler, JFR, and JMH, then validate improvements against SLO-driven criteria. This profiling-first workflow produces before/after metrics to ensure corrections actually resolve the identified bottlenecks.

What causes N+1 queries and connection pool issues in Spring Boot 4?

N+1 queries, unbounded collections, and HikariCP connection pool sizing issues are common Spring Boot performance antipatterns. They are detected by profiling hot paths and applying correction techniques during the plan and review phases to prevent performance regressions.

When do I need JMH microbenchmarks versus async-profiler for JVM performance?

You need JMH for microbenchmark measurements of specific code segments, while async-profiler and JFR capture broader CPU and memory profiling data. Use them together to establish baselines and validate SLIs for hot paths in Spring Boot applications.

Does this approach work for diagnosing virtual-thread pinning in Spring Boot 4?

Yes, diagnosing virtual-thread pinning is supported alongside GC behavior and caching analysis. The profiling toolchain identifies these JVM-level performance antipatterns, allowing you to apply targeted correction techniques and verify the results against your SLOs.

How do I validate SLOs and SLIs during a Spring Boot refactoring?

Validate SLOs and SLIs during Spring Boot refactoring by applying profiling, metrics, and antipattern checks to hot paths. This enforces SLO-driven criteria and produces before/after evidence, ensuring the refactor does not introduce performance regressions.

What's the best way to measure Micrometer metrics against performance baselines?

The best way to measure Micrometer metrics is integrating them with async-profiler and JFR data to establish baselines for hot paths. This SLO-driven approach validates that performance corrections meet service level objectives with before/after evidence.