deco-performance-audit

Deco Performance Audit Skill

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "deco-performance-audit" with this command: npx skills add decocms/deco-start/decocms-deco-start-deco-performance-audit

Deco Performance Audit Skill

This skill performs a comprehensive performance analysis of a Deco site using CDN metrics and error logs. It generates actionable reports with specific recommendations.

When to Use This Skill

  • Investigating slow page loads

  • Analyzing cache effectiveness

  • Debugging high error rates

  • Understanding traffic patterns

  • Before/after deployment comparisons

  • Monthly performance reviews

What the Audit Produces

Performance Report

  • Overall metrics summary (requests, bandwidth, cache rate)

  • Hot paths table - Top 20 paths with requests AND bandwidth columns

  • Content type breakdown - Grouped by type (API, HTML, JS, Images, etc.)

  • Bandwidth hotspots - Which paths consume the most bandwidth

  • Cache status breakdown with drill-down

  • HTTP status code distribution

  • Time series analysis - Peak hours, traffic patterns

  • Lazy section analysis - /deco/render performance

  • Error log analysis with grouping

  • Geographic traffic distribution

  • Period comparison - Week over week (if available)

  • Actionable recommendations with priority

Tools Used

CDN Monitoring (MONITOR_* tools)

Tool Purpose

MONITOR_SUMMARY

Overall metrics: requests, pageviews, bandwidth, cache ratio, latency

MONITOR_TOP_PATHS

Top URLs by requests or bandwidth

MONITOR_CACHE_STATUS

Cache hit/miss/expired breakdown

MONITOR_STATUS_CODES

HTTP status code distribution

MONITOR_TOP_COUNTRIES

Geographic traffic distribution

MONITOR_USAGE_TIMELINE

Time series usage data

Error Logs (HyperDX)

Tool Purpose

SEARCH_LOGS

Find error messages by query

GET_LOG_DETAILS

Get detailed log entries with grouping

QUERY_CHART_DATA

Time series error counts

Tool Parameters

All MONITOR tools require:

{ "sitename": "mystore", // Deco site name "hostname": "www.mystore.com", // Production hostname "startDate": "2026-01-17", // YYYY-MM-DD "endDate": "2026-01-18", // YYYY-MM-DD "granularity": "daily" // "hourly" or "daily" }

Optional filters:

{ "filters": [ { "type": "path", "operator": "contains", "value": "/p" }, { "type": "cache_status", "operator": "equals", "value": "miss" }, { "type": "status_code", "operator": "equals", "value": "500" } ] }

Filter types: cache_status , status_code , path , country

Operators: equals , not_equals , contains , not_contains

Workflow

  1. Get MONITOR_SUMMARY → Overall health
  2. Get MONITOR_TOP_PATHS → Hot pages
  3. Get MONITOR_CACHE_STATUS → Cache effectiveness
  4. Get MONITOR_STATUS_CODES → Error rates
  5. SEARCH_LOGS → Find error patterns
  6. GET_LOG_DETAILS → Dig into specific errors
  7. Correlate with code → Find root causes
  8. Generate report → Actionable recommendations

Metrics to Analyze

  1. Cache Performance

Goal: Cache hit ratio > 80%

MONITOR_CACHE_STATUS response:

  • hit: Served from cache (good)
  • miss: Origin fetch required (optimize)
  • expired: Cache expired, refetched
  • revalidated: Cache validated with origin
  • unknown: No cache header

Red Flags:

  • Cache hit ratio < 50%

  • High "unknown" cache status (missing headers)

  • High "miss" on static assets

Recommendations:

  • Add cache-control headers to loaders

  • Use stale-while-revalidate for dynamic content

  • Cache static assets aggressively

  1. Error Rates

Goal: 5xx errors < 0.1%, 4xx < 5%

MONITOR_STATUS_CODES response:

  • 200: Success
  • 301/302/307: Redirects (expected but minimize)
  • 304: Not Modified (good - client cache)
  • 400: Bad Request (client issue)
  • 404: Not Found (check for broken links)
  • 429: Too Many Requests (rate limiting)
  • 500: Server Error (investigate immediately)
  • 502/504: Gateway errors (origin issues)

Red Flags:

  • 5xx > 0.5%

  • 429 > 5% (hitting rate limits)

  • 404 > 10% (broken links/SEO issue)

  1. Hot Paths & Traffic Analysis

Goal: Understand traffic patterns with full visibility

MUST Include: Complete Hot Paths Table

Always generate a table showing the actual data:

Hot Paths by Requests

RankPathRequests%BandwidthCache Hit
1/live/invoke/vtex/loaders/...835K4.0%46.9GB0.0002%
2/_frsh/js/chunk-abc123.js524K2.5%15.2GB94.3%
3/sprites.svg312K1.5%890MB99.1%
..................

Hot Paths by Bandwidth

RankPathBandwidth%RequestsNotes
1/live/invoke/vtex/loaders/...46.9GB35%835K🔴 Uncached
2/_frsh/js/chunk-abc123.js15.2GB11%524K✅ Well cached
..................

Content Type Grouping

Group paths by type for clearer analysis:

Content Type Pattern Requests Bandwidth Cache Rate

API Calls /live/invoke/*

2.1M 89GB 0.05%

Lazy Sections /deco/render

450K 12GB 15%

JavaScript /_frsh/js/*

1.8M 45GB 94%

Static Images /image/* , *.png/jpg

890K 120GB 88%

HTML Pages / , /s , /:slug/p

320K 8GB 5%

Fonts *.woff2

210K 3.2GB 99%

Icons /sprites.svg

180K 540MB 99%

This grouping reveals:

  • API calls often consume most bandwidth but have low cache

  • Lazy sections (/deco/render ) need cache optimization

  • Static assets should have >90% cache rate

  1. Lazy Section Analysis

Goal: Understand /deco/render performance

MONITOR_TOP_PATHS with filter: filters: [{ type: "path", operator: "contains", value: "/deco/render" }]

Analyze:

Section (from query params) Requests Avg Latency Cache Hit

ProductShelf 120K 180ms 12%

Reviews 85K 220ms 5%

SimilarProducts 65K 350ms 0%

Red Flags:

  • Lazy sections with 0% cache = every scroll triggers origin fetch

  • High latency on popular sections = poor UX

  1. Time Series Analysis

Goal: Identify traffic patterns and correlations

MONITOR_USAGE_TIMELINE with granularity: "hourly"

Generate:

Hour Requests Errors Cache Hit % Notes

00:00 85K 12 52% Low traffic

10:00 320K 45 48% Morning peak

14:00 410K 120 45% Afternoon peak

20:00 380K 200 44% Evening peak, error spike

Look for:

  • Peak hours (when to avoid deployments)

  • Error spikes correlated with traffic spikes

  • Cache hit rate degradation under load

  1. Bandwidth Hotspots

Goal: Find paths consuming disproportionate bandwidth

Sort by bandwidth descending and highlight:

  • Uncached large payloads (JSON API responses)

  • Large images not going through optimization

  • JS bundles that could be smaller

🔴 Bandwidth Concerns:

PathBandwidthCacheIssue
/live/invoke/vtex/loaders/productList46GB0%Uncached, high volume
/deco/render?section=BigCarousel8GB5%Large payloads
  1. Error Log Analysis

Common Error Patterns:

Error Meaning Action

"Too Many Requests" VTEX rate limiting Reduce API calls, add caching

"TypeError: Cannot read" JS runtime error Fix the code

"Failed to fetch" Network/API issue Add retries, timeout handling

"Oops! dangling reference" Missing block Fix block config

Searching Logs:

SEARCH_LOGS({ query: "level:error site:mystore", limit: 50 })

Getting Details:

GET_LOG_DETAILS({ query: "level:error site:mystore", groupBy: ["body", "service", "site"] })

Report Template

Performance Audit Report - [Site Name]

Period: 2026-01-17 to 2026-01-18 Generated: 2026-01-18T15:00:00Z


Executive Summary

MetricValueStatus
Total Requests20.4M-
Total Bandwidth1.2 TB-
Cache Hit Ratio42.8%🔴 Below 80% target
API Avg Latency245ms🟡 Review
5xx Error Rate0.017%🟢 Below 0.1%
429 Rate Limit6.8%🔴 High

Key Findings

  1. Finding 1 with impact and recommendation
  2. Finding 2 with impact and recommendation
  3. Finding 3 with impact and recommendation

Traffic Analysis

Hot Paths by Requests (Top 15)

#PathRequests%BandwidthCache Hit
1/live/invoke/vtex/loaders/...835K4.0%46.9GB🔴 0.0%
2/_frsh/js/chunk-abc.js524K2.5%15.2GB🟢 94.3%
3/sprites.svg312K1.5%890MB🟢 99.1%
..................

Bandwidth Hotspots (Top 10 by GB)

#PathBandwidth% of TotalCacheAction
1/live/invoke/vtex/loaders/productList46.9GB15%🔴 0%Add caching
2/_frsh/js/* (combined)25GB8%🟢 94%OK
3/deco/render?section=Carousel12GB4%🟡 15%Improve cache

Content Type Summary

TypeRequestsBandwidthCache RateNotes
API (/live/invoke/*)2.1M89GB0.05%🔴 Needs caching
Lazy Sections (/deco/render)450K12GB15%🟡 Improve
JavaScript (/_frsh/*)1.8M45GB94%🟢 Good
Images890K120GB88%🟢 Good
HTML Pages320K8GB5%🟡 Expected for dynamic
Fonts210K3.2GB99%🟢 Excellent

Lazy Section Performance

/deco/render Analysis

SectionRequestsBandwidthAvg LatencyCachePriority
ProductShelf120K3.2GB180ms12%🔴 High
Reviews85K1.8GB220ms5%🔴 High
SimilarProducts65K2.1GB350ms0%🔴 Critical
FAQ45K890MB85ms45%🟢 OK

Issues:

  • SimilarProducts has 0% cache hit - every scroll fetches from origin
  • High latency on Reviews section affects perceived performance

Time Series (24h Pattern)

HourRequests5xx429Cache HitNotes
00-0685K/hr<1012052%Low traffic
06-10180K/hr2545048%Morning ramp
10-14320K/hr451.2K45%Peak hours
14-18280K/hr4098046%Steady
18-22380K/hr1201.8K44%Evening peak, 429 spike
22-00150K/hr2032050%Wind down

Pattern Analysis:

  • Peak: 10:00-14:00 and 18:00-22:00
  • 429 errors correlate with evening peak
  • Cache hit degrades under high load

Cache Analysis

Status Breakdown

StatusRequests%BandwidthIssue
HIT8.7M42.8%480GB
MISS6.6M32.4%520GB🟡 Review
UNKNOWN4.7M23.0%180GB🔴 Missing headers
expired280K1.4%15GB-
revalidated80K0.4%5GB-

Uncached Hot Paths (Cache MISS filter)

PathRequestsBandwidthShould Cache?
/live/invoke/vtex/loaders/productList450K32GB✅ Yes, with SWR
/live/invoke/site/loaders/search280K18GB✅ Yes, short TTL
/deco/render?section=Reviews85K1.8GB✅ Yes

Error Analysis

HTTP Status Distribution

StatusCount%TrendAction
20018.2M89.2%-
304680K3.3%-✅ Good client cache
4291.38M6.8%🔴 Rate limiting
404536K2.6%🟡 Audit links
5003.1K0.015%✅ Low

500 Error Breakdown

PathCount% of 500sRoot Cause
/live/invoke/vtex/actions/cart/simulation1.4K45%VTEX timeout
/live/invoke/site/loaders/search38012%Search API

Error Log Patterns

Error MessageCountServiceAction
"Too Many Requests"1.2KvtexAdd request dedup
"The operation was canceled"450catalogIncrease timeout
"TypeError: Cannot read..."85siteFix code

Geographic Distribution

CountryRequests%Expected?
Brazil18.5M90.7%✅ Primary market
USA500K2.4%🟡 Could be CDN/bots
Unknown380K1.9%🟡 Review
............

Recommendations

🔴 High Priority

#IssueImpactFix
123% requests have unknown cacheWasted bandwidthAdd export const cache to loaders
26.8% hitting rate limitsUser errorsImplement request deduplication
3SimilarProducts 0% cacheHigh latencyAdd SWR cache

🟡 Medium Priority

#IssueImpactFix
42.6% 404 errorsSEO impactAudit broken links
5Cart simulation errorsCheckout dropsAdd retry logic

🟢 Low Priority

#IssueImpactFix
6Non-BR trafficPossible botsMonitor, consider geo-blocking

Targets

MetricCurrentTargetGapPriority
Cache Hit Ratio42.8%80%-37.2%🔴
429 Error Rate6.8%<0.5%-6.3%🔴
Unknown Cache23%<5%-18%🔴
404 Error Rate2.6%<2%-0.6%🟡

Example Queries

Find pages with high miss rate

MONITOR_TOP_PATHS with filter: filters: [{ type: "cache_status", operator: "equals", value: "miss" }]

Find 5xx errors by path

MONITOR_TOP_PATHS with filter: filters: [{ type: "status_code", operator: "contains", value: "5" }]

Error trend over time

QUERY_CHART_DATA({ series: [{ dataSource: "events", aggFn: "count", where: "level:error site:mystore", groupBy: ["service"] }], granularity: "1 hour" })

Integration with deco-full-analysis

Use this skill after running deco-full-analysis to:

  • Correlate performance issues with specific loaders/sections

  • Identify which custom code paths are problematic

  • Validate that lazy loading is working correctly

  • Verify cache headers on custom loaders

Best Practices

Cache Headers for Loaders

// loaders/myLoader.ts export const cache = "stale-while-revalidate"; export const cacheKey = (props: Props) => ${props.id};

Reducing API Calls

// Use loader deduplication // Same loader called multiple times = single fetch export const cache = "stale-while-revalidate";

Error Handling

// Graceful degradation try { const data = await fetch(url); return data; } catch (e) { console.error("Fetch failed:", e); return fallbackData; }

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

deco-storefront-test-checklist

No summary provided by upstream source.

Repository SourceNeeds Review
General

deco-tanstack-search

No summary provided by upstream source.

Repository SourceNeeds Review
General

deco-site-memory-debugging

No summary provided by upstream source.

Repository SourceNeeds Review
General

deco-e2e-testing

No summary provided by upstream source.

Repository SourceNeeds Review