Avoid long tasks that block ad-related network requests
Stay organized with collections
Save and categorize content based on your preferences.
Overview
This audit checks whether or not the first ad request is being delayed by long
tasks. A
long task is
defined as JavaScript code that blocks the main thread for 50ms or more. If long
tasks occur before an ad request, the browser will be unable to issue the
request until all of the tasks complete.
Recommendations
Examine the tasks that are blocking the first ad request and investigate ways to
remove them or reduce their execution time below 100ms. Some approaches to
reducing execution time include:
Optimizing tasks to execute faster
Splitting tasks into smaller chunks, which individually execute in < 100ms
Delaying tasks until after ad requests are made
Moving tasks off of the main thread via a worker
More information
This audit displays the top 10 longest tasks by execution time, sorted by start
time (ascending).
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-06-26 UTC."],[[["This audit identifies long-running JavaScript tasks (over 100ms) that delay the initial ad request, potentially impacting ad revenue."],["Optimizing, splitting, delaying, or offloading these tasks can improve ad loading times."],["The audit highlights the top 10 longest tasks based on their execution time to help pinpoint problem areas."],["Long tasks block the main thread, preventing the browser from sending the ad request until they complete."],["Addressing these tasks is crucial for ensuring timely ad delivery and a smoother user experience."]]],[]]