performance-optimization

Diagnose and fix performance bottlenecks in Python services, Next.js apps, and Azure infrastructure.

1|Updated Aug 10, 2026
One-click install
npx skills add https://github.com/TheViziusGroup/vibe-engineering-skills --skill performance-optimization-theviziusgroup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: performance-optimization
Source: https://github.com/TheViziusGroup/vibe-engineering-skills/tree/main/plugins/frontend-design/skills/performance-optimization
Command: npx skills add https://github.com/TheViziusGroup/vibe-engineering-skills --skill performance-optimization-theviziusgroup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Production systems suffer from slow APIs, poor Core Web Vitals, and costly cloud configurations, but teams often optimize blindly without measurement. This Skill provides a measurement-first reference for diagnosing and fixing performance bottlenecks across Python backends, Next.js frontends, and Azure cloud infrastructure. ## Core Features & Use Cases - Python Performance: Profiling workflows with py-spy and Scalene, GIL and free-threading guidance for Python 3.13t/3.14t, NumPy/Pandas vectorization (100–740x wins), Numba/Cython acceleration, asyncio best practices, and ASGI vs WSGI benchmarks. - Next.js/TypeScript Performance: Core Web Vitals targets (LCP, INP, CLS), RSC bundle discipline, App Router's four caching layers, PPR/Cache Components, Turbopack trade-offs, and Prisma connection pooling in serverless. - Azure Cloud Performance: Compute tier cold-start comparison, ACA/KEDA scale-to-zero, messaging service selection (Event Grid vs Event Hubs vs Service Bus), Redis ConnectionMultiplexer rules, Front Door CDN/WAF, VMSS autoscale thresholds, and cost tier guidance. - Use Case: Your Next.js dashboard has INP over 200ms and your Python API's P99 latency is spiking. Use this Skill to identify that a misplaced "use client" directive is bloating the bundle and that a copy.deepcopy in a retry loop is the Python hot path, then apply the staged remediation plan. ## Quick Start Ask the AI to diagnose why your FastAPI endpoint has high P99 latency and recommend profiling steps and fixes based on the performance reference.

Frequently Asked Questions about performance-optimization

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

FAQPage Schema
How do I profile a Python application in production?

Use py-spy to attach to a live process with minimal overhead: run `py-spy top --pid <pid>` for a live view or `py-spy record -o out.svg --pid <pid>` for a flame graph. Follow up with Scalene to classify whether time is spent in Python, native code, or memory copying.

How do I improve Core Web Vitals in a Next.js app?

Preload the LCP image with `next/image priority`, push `"use client"` directives to leaf components to cut First Load JS, and set explicit width/height on media to prevent CLS. Break up JavaScript tasks over 50ms and defer third-party scripts to improve INP.

FastAPI vs Flask: which is faster for I/O-bound APIs?

FastAPI (ASGI) handles roughly 3x more requests per second than Flask (WSGI) on I/O-bound workloads, since one Uvicorn worker manages thousands of concurrent requests via asyncio. For CPU-bound or simple sync apps, the advantage shrinks significantly.

Does free-threaded Python 3.14 remove the GIL?

Python 3.14t officially supports free-threading with roughly 5–10% single-thread overhead, but importing a C extension that hasn't declared thread-safety silently re-enables the GIL. Check `sys._is_gil_enabled()` after imports to verify.

Why does my Azure Function have slow cold starts?

Consumption plan functions scale to zero after ~20 minutes and take 2–7 seconds to cold start, longer with heavy dependency injection. Move latency-sensitive workloads to Flex Consumption with always-ready instances or Premium plans with pre-warmed instances.

When should I not use Turbopack for production builds?

Skip Turbopack for production if A/B testing shows increased First Load JS — controlled tests showed ~19% faster builds but ~279KB larger median First Load JS per route. A hybrid approach using Turbopack for dev and Webpack for production is a valid fallback.