Skip to content

Commit

Permalink
fix: use requestAnimationFrame instead
Browse files Browse the repository at this point in the history
  • Loading branch information
ricokahler committed Sep 30, 2024
1 parent 2a1777f commit 1727b56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions perf/efps/helpers/measureBlockingTime.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ export function measureBlockingTime(page: Page): () => Promise<number> {
last = current

if (done) return
requestIdleCallback(handler)
requestAnimationFrame(handler)
}

requestIdleCallback(handler)
requestAnimationFrame(handler)

await new Promise((resolve) => {
document.addEventListener('__blockingTimeFinish', resolve, {once: true})
Expand Down

0 comments on commit 1727b56

Please sign in to comment.