Skip to main content
KadiCache
Lighthouse: bootup-time · TBT & INP10 min read1,051 wordsVerified 2026-11-23

How to Fix “Reduce JavaScript execution time” (bootup-time) in WordPress

Lighthouse triggers “Reduce JavaScript execution time” when parsing, compiling, and executing scripts consumes more than 2.0 seconds of mobile CPU time—freezing taps and tanking Total Blocking Time (30% of your PageSpeed score).

Reduce JavaScript execution time (bootup-time) WordPress optimization diagram
0.000 Layout Shift5 Sections✓ Verified
Lighthouse Audit ID
bootup-time
Metrics Affected
TBT · INP
KadiCache Solution Tier
Free Core
3-Step Quick Action Plan (Schema HowTo)
STEP 01
Delay Non-Critical Plugin & Third-Party JS Execution

Open WP Admin -> KadiCache -> CSS & JavaScript and select Delay Until Interaction so GTM, ad pixels, chat SDKs, and non-essential bundles consume 0 ms of initial bootup CPU.

STEP 02
Enable Smart WooCommerce Cart Fragments & YouTube Previews

Enable Smart Cart Fragments under CSS & JavaScript -> Commerce & Smart Cart and Replace YouTube iframes with preview image under Lazyload to stop AJAX hydration and player bootup spikes.

STEP 03
Disable Cloudflare Rocket Loader & Redundant Frontend Poll Scripts

Turn OFF Rocket Loader in KadiCache -> Cloudflare -> Speed & Network and click Apply Recommended Preset in Bloat Removal to disable frontend Heartbeat and legacy WP scripts.

WP Admin -> KadiCache -> CSS & JavaScript (Defer & Delay JS)
MODULE TBT & INP · 2X RETINA
JavaScript Minification, Defer, and Delay execution controls with automatic jQuery and WooCommerce safeguards.2880×1840 WebP
⚡ Executive Summary · 30-Second Spec100% Code-Verified
WP Admin Path
WP Admin -> KadiCache -> CSS & JavaScript + Lazyload + Bloat Removal
Measured Impact
Drops JS Bootup CPU From 3.8–7.2 s to < 0.4 s (100% Free Core)
DevTools Proof Marker
Lighthouse ID: bootup-time | Warn > 2.0s · Fail > 3.5s
  • Lighthouse attributes V8 CPU time to every individual script URL consuming >= 50 ms (Total = Script Evaluation + Script Parse + Compile), warning above 2.0 seconds and failing red above 3.5 seconds.
  • Key Distinction — Bytes vs CPU: Reduce unused JavaScript measures wasted file size (KiB), whereas Reduce JavaScript execution time measures actual CPU burn (ms)! A tiny 14 KB plugin script running querySelectorAll("*") inside a MutationObserver can burn 900 ms of CPU with 0 KiB unused bytes!
  • Because bootup-time directly drives Long Tasks (> 50 ms), fixing this single audit improves Total Blocking Time (30% PSI weight) and real-user Interaction to Next Paint (INP) more than almost any other change.
  • 100% Free Core Stack: Delay JS Until Interaction + Smart Cart Fragments + YouTube Preview Facade + Bloat & Heartbeat Control.
Table of Contents (5 sections)

How Lighthouse Attributes bootup-time Per Script URL#

During a PageSpeed Insights run, Chromium’s V8 engine samples the call stack every microsecond on the main thread. Lighthouse maps every EvaluateScript, v8.compile, FunctionCall, FireAnimationFrame, and TimerInstall event back to the exact script URL at the bottom of the stack, displaying three columns:

  1. Total CPU Time: Combined milliseconds that script kept the main thread busy.
  2. Script Evaluation: Executing functions, DOM queries, framework hydration, event listeners, and timers.
  3. Script Parse: Decompressing, tokenizing, and compiling JavaScript source text into V8 bytecode.

Whenever you see Unattributable or your own page URL (/) near the top of the bootup-time table, that CPU time came from inline <script> blocks printed directly inside HTML (such as GTM custom HTML snippets, Elementor elementorFrontendConfig initializers, or inline WooCommerce JSON handlers) or browser extensions if you accidentally ran DevTools outside Incognito!

The 5 Heaviest JavaScript CPU Hogs on WordPress & WooCommerce#

Script Row in bootup-timeTypical Mobile CPU TimeWhy It Burns So Much CPU
googletagmanager.com/gtm.js + Ad Pixels (fbevents.js, clarity.js)950 ms – 2,600 msEvaluates tag triggers, scrapes DOM buttons/forms for auto-event tracking, and fires cascading marketing pixels
youtube.com/s/player/.../base.js650 ms – 1,400 ms per videoCompiles a massive video player app and initializes MediaSource buffers before anyone clicks Play
Live Chat & Support Widgets (Intercom, Zendesk, Tidio, Crisp)450 ms – 1,100 msBoots a full client-side React/Preact single-page app + WebSocket connection inside an iframe
wc-cart-fragments.min.js & Heavy Filter / Wishlist Plugins220 ms – 680 msFires /?wc-ajax=get_refreshed_fragments on boot and re-parses mini-cart DOM fragments across every product card
Page-Builder Motion Effects & MutationObserver Plugins280 ms – 850 msAttaches non-passive scroll listeners or runs MutationObserver({ subtree: true }) across 3,000 DOM nodes
FIG 01Holding heavy bootup scripts until interaction while allowing fine-grain URL and inline exclusionsZoom 2x

Finding Runaway Custom Scripts in Chrome DevTools (Bottom-Up View)#

If a custom theme script or inline snippet is burning 400+ ms even on lean pages, profile it in Chrome DevTools in 20 seconds:

TEXTPinpointing Exact Slow Functions in Chrome DevTools Performance
1. Open your URL in a clean Incognito window (0 browser extensions!).
2. Open DevTools (F12) -> Performance tab -> click Capture Settings (gear icon).
3. Set CPU to "4x slowdown" and click "Record and reload page".
4. Click the "Bottom-Up" tab at the bottom -> set Group By to "URL".
5. Expand the heaviest script URL to see the exact function name and line number!

When fixing custom theme JavaScript manually, replace continuous window.addEventListener("scroll", ...) geometry polling with native IntersectionObserver, always pass { passive: true } on touch/wheel listeners, and scope MutationObserver strictly to a small container instead of document.body.

How KadiCache Clears Reduce JavaScript execution time in Free Core#

FIG 02Stopping unnecessary WooCommerce cart-fragment AJAX and DOM hydration for browsing guestsZoom 2x
  1. Zero Bootup CPU for Non-Essential Bundles (DelayJsOptimizer.php): Selecting Delay Until Interaction in WP Admin -> KadiCache -> CSS & JavaScript (Delay JS Guide) keeps GTM, ad pixels, chat widgets, and non-critical plugin scripts at 0 ms bootup CPU during initial page load. Better yet, DelayScriptClassifier.php replays interactive UI handlers before background analytics tags when the visitor taps or scrolls—so first-tap INP stays razor-sharp!
  2. Automatic Safety Guards (ScriptOptimizer.php & ConsentScripts.php): Payment gateways (Stripe, PayPal, Apple Pay), security challenges (Turnstile, reCAPTCHA), WooCommerce /cart/ & /checkout/ flows, and GDPR consent managers (Complianz, CookieYes, Cookiebot) are respected automatically.
  3. Eliminate WooCommerce & Media CPU Spikes (Smart Cart + YouTube Facade): Enable Smart WooCommerce Cart Fragments (Commerce & Smart Cart) so empty-cart guests skip wc-ajax=get_refreshed_fragments hydration (WooCommerce Guide), and enable Replace YouTube iframes with preview image (Lazyload) to erase 1,000+ ms of base.js CPU.
  4. Disable Frontend Heartbeat & Legacy WP Bloat (Bloat Removal): Click Apply Recommended Preset in WP Admin -> KadiCache -> Bloat Removal (Bloat & Heartbeat Guide) to stop heartbeat.min.js, wp-emoji-release.min.js, and jquery-migrate.min.js from running on public pages.

Fine-Grain Opt-Outs Without Re-Introducing bootup-time Failures#

Sometimes a single lightweight above-the-fold widget (like an interactive SaaS ROI slider or immediate gtag pageview ping) must execute on initial load while 1.2 MB of chat, heatmap, and social pixels stay delayed. Use KadiCache’s targeted opt-out patterns instead of turning off Delay JS globally:

HTMLSelective Opt-Out Attribute on One Essential Above-the-Fold Script
<!-- Executes immediately via safe defer (~8 ms CPU) while GTM/Meta/Chat stay delayed! -->
<script src="/wp-content/themes/agency/assets/js/pricing-slider.min.js"
        defer
        data-kadicache-no-delay></script>
Real-World ScenarioExact Exclusion Substring (Delay JS Exclusions)Initial bootup-time Impact
Immediate GA4 Pageview Count (0s Bounces)googletagmanager.com/gtag/js (keep gtm.js / Meta / Clarity delayed)~45 – 80 ms (well inside < 2.0 s pass budget!)
Custom Above-the-Fold Pricing Calculator/assets/js/pricing-slider.min.js or data-kadicache-no-delay~10 – 25 ms
Checkout & Cart Payment SDKs (Stripe, PayPal)None needed! Automatically protected by DelayScriptClassifier.php & route rules0 ms on catalog/blog pages; 100% intact on /checkout/
CookieYes / Complianz / Cookiebot BannerNone needed! Automatically recognized by ConsentScripts.phpCompliant immediate banner with minimal CPU

“Reduce JavaScript execution time” — Frequently Asked Questions

Why did my local Chrome DevTools Lighthouse test show chrome-extension:// URLs inside Reduce JavaScript execution time?
Ad blockers, password managers (1Password/Bitwarden), React DevTools, and Grammarly inject heavy content scripts into every page you visit in a normal Chrome profile—adding 400–1,200 ms of fake bootup CPU! Always run local Lighthouse or Performance traces in a clean Incognito window with extensions disabled.
Why did combining 18 JavaScript files into one giant bundle make bootup-time WORSE?
Merging 18 scripts into one 900 KB file creates a single monolithic V8 compilation and evaluation task on the main thread (> 600 ms Long Task) and prevents granular exclusion of critical vs delayed scripts! Over HTTP/2 and HTTP/3, individual minified + deferred/delayed scripts outperform JS concatenation every time.
Does KadiCache Delay JS break WooCommerce variable product swatch dropdowns or Add to Cart?
No! DelayJsOptimizer.php automatically wakes up scripts on first user pointer/touch/scroll/keydown interaction, preserves WooCommerce checkout/cart routes, and refreshes mini-cart and 6 major wishlist counters cleanly.
What if an essential above-the-fold script (like a live stock ticker or interactive mortgage calculator) must run immediately on load?
Add its script handle or URL substring under WP Admin -> KadiCache -> CSS & JavaScript -> Delay JavaScript Exclusions (or add data-kadicache-no-delay to its <script> tag). It will execute immediately with safe defer while all third-party marketing/chat bundles remain delayed!
Can server-side tracking (Cloudflare Zaraz or Server-Side GTM) also help reduce JavaScript execution time?
Yes! Moving Meta CAPI, TikTok Events API, and Google Ads conversions to a server-side endpoint reduces browser-side tag scripts, and pairing that with KadiCache Delay JS drives client-side bootup-time close to zero.
Verified WordPress Fix · bootup-time
Clear “Reduce JavaScript execution time” without breaking Elementor or WooCommerce.
E-E-A-T Source Verified

Creator of KadiCache’s Early PHP Drop-In, 7-Driver Object Cache Engine, Cloud Remove Unused CSS, and Zero-CLS Lazy Render pipeline.

apps/wordpress-plugin/src/Optimization/DelayJsOptimizer.phpapps/wordpress-plugin/src/Optimization/Scripts/DelayScriptClassifier.phpapps/wordpress-plugin/src/Optimization/ScriptOptimizer.phpapps/wordpress-plugin/src/Optimization/ConsentScripts.php
Connected Topical Cluster · Continue Deepening Your Setup