performance

Diagnose and optimize Magento 2 performance bottlenecks with profiler evidence.

2|3|Updated Mar 19, 2026
One-click install
npx skills add https://github.com/caravanglory/magehub --skill performance-caravanglory
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance
Source: https://github.com/caravanglory/magehub/tree/main/skills/performance/performance
Command: npx skills add https://github.com/caravanglory/magehub --skill performance-caravanglory

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill helps you diagnose and optimize Magento 2 performance problems by turning slow pages, heavy queries, and inefficient cache behavior into a measured improvement plan.

Core Features & Use Cases

  • Performance Profiling: Baseline response time, memory, and query count before making changes.
  • Bottleneck Analysis: Investigate backend, database, cache, search, queue, and frontend layers using Magento profiler, query logs, New Relic, Blackfire, Lighthouse, and WebPageTest.
  • Cache and Invalidation Guidance: Apply safe caching strategies, block-level cache keys, cache tags, and targeted invalidation instead of broad flushes.
  • Use Case: When a category page is slow because of repeated database lookups and uncached block rendering, use this Skill to identify the dominant bottleneck, apply the smallest fix, and verify the improvement with the same measurement method.

Quick Start

Ask the skill to profile the slow Magento page or command, identify the main bottleneck, and return the smallest safe optimization with before-and-after verification.

Frequently Asked Questions about performance

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

FAQPage Schema
How do I find and fix Magento 2 performance bottlenecks?

To find Magento 2 performance bottlenecks, establish a production-like baseline and use profilers like New Relic or Blackfire to identify dominant slowdowns. Apply the smallest safe optimization and verify the improvement with before-and-after measurements.

What is causing high TTFB and slow SQL queries on my Magento store?

High TTFB and slow SQL queries in Magento are often caused by N+1 query problems and uncached block rendering. Profiling the specific page or command helps pinpoint the exact database lookup or cache miss responsible for the latency.

How do I resolve Magento full page cache misses and block cache invalidation issues?

Resolve Magento full page cache misses by implementing safe caching strategies with proper block-level cache keys and cache tags. Use targeted invalidation to clear specific entries instead of broad cache flushes to maintain performance.

Can I use New Relic and Blackfire to profile Magento frontend rendering latency?

Yes, you can use New Relic and Blackfire alongside frontend tools like Lighthouse and WebPageTest to profile Magento rendering latency. These tools provide the APM evidence and profiler data needed to target frontend slowdowns effectively.

What is the best way to optimize a slow Magento category page with repeated database lookups?

The best way to optimize a slow Magento category page is to profile the page, identify the repeated database lookups and uncached block rendering, apply targeted cache and query analysis, and verify the fix using the same measurement method.