Frontend Bundle and Hydration Bottleneck Diagnostic
Analyze client-side bundle overhead, hydration locks, and Core Web Vitals latency across critical rendering paths.
Use this template when evaluating slow page interactions or bloated JavaScript payloads in single-page and hybrid web applications. It systematically breaks down script execution costs, third-party script tax, and hydration bottlenecks.
Role: Staff Web Performance Architect specializing in Core Web Vitals and runtime optimization.
Context
- Primary JavaScript stack: {{framework_stack}}
- Maximum target bundle budget: {{target_bundle_budget}}
- Current measured LCP baseline: {{current_lcp_ms}}
- Integrated external services: {{third_party_scripts}}
- Target user journey: {{critical_user_flow}}
- Rendering architecture: {{server_rendering_mode}}
Task
Produce an in-depth web performance diagnostic analysis that exposes script execution bottlenecks, hydration delays, and bundle composition issues for {{critical_user_flow}}, providing targeted architectural remediations.
Method
- Analyze the core runtime footprint imposed by {{framework_stack}} alongside {{server_rendering_mode}}.
- Trace the critical rendering path for {{critical_user_flow}} and pinpoint main-thread blocking segments.
- Compare total payload transfer against {{target_bundle_budget}} to isolate module bloat and un-shaken dependencies.
- Quantify the performance penalty and layout stability risks introduced by {{third_party_scripts}}.
- Examine hydration scheduling to identify long tasks suppressing interaction responsiveness.
- Correlate client execution metrics with the current {{current_lcp_ms}} baseline to identify root latency drivers.
- Prioritize architectural remedies using an impact-versus-effort matrix focused on Largest Contentful Paint and Interaction to Next Paint.
Constraints
- Analysis MUST explicitly isolate first-party application code from third-party vendor overhead.
- Recommendations MUST NOT propose rewriting to entirely different framework ecosystems.
- Include quantifiable estimates for projected reduction in Total Blocking Time for each recommendation.
- Maintain focus strictly on client execution, network payloads, and hydration behavior.
Output format
- Executive Performance Summary (max 150 words)
- Payload & Dependency Decomposition (table comparing observed vs {{target_bundle_budget}})
- Hydration & Main-Thread Blocking Analysis (numbered technical breakdown)
- Third-Party Impact Assessment (bulleted risk inventory)
- Remediation Plan (prioritized table: Bottleneck, Solution, Projected TBT/LCP Gain, Complexity)
Self-review
- Verify every referenced variable is addressed directly within the context of web performance.
- Confirm calculations or comparisons directly reference {{current_lcp_ms}} and {{target_bundle_budget}}.
- Ensure no generic advice is present and all steps align with modern browser metrics.
Explicit role, a named task, and discrete steps the model can follow.
Background, inputs and variables the model needs before it starts.
Hard boundaries — what the model must and must not do.
A named, field-level shape for the response.
Ordered work items that force analysis before an answer.
Length and structure that travel across frontier models.
Signal density — instruction weight without padding.
Documented variables so the scaffold adapts to new inputs.
Quality bar, assumptions and behaviour when inputs are thin.
How much real usage the template has behind it.