perf(base): use queueMicrotask instead of rAF in scheduleRenderTask#13650
Open
pskelin wants to merge 1 commit into
Open
perf(base): use queueMicrotask instead of rAF in scheduleRenderTask#13650pskelin wants to merge 1 commit into
pskelin wants to merge 1 commit into
Conversation
Headless Cypress browsers throttle requestAnimationFrame, which can delay test execution. Switch the leading scheduler in scheduleRenderTask to queueMicrotask to avoid the rAF throttle and see if it gives a measurable speedup in CI test runs. Refs: #13642 (comment)
|
🚀 Deployed on https://pr-13650--ui5-webcomponents-preview.netlify.app |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Headless Cypress browsers throttle
requestAnimationFrame, which can delay test execution. Switch the leading scheduler inscheduleRenderTask(Render.ts:77) fromwindow.requestAnimationFrametoqueueMicrotaskto bypass the rAF throttle.Goal of this PR: see if CI test durations actually shorten — that is the open question from #13642.
Context
Follow-up on #13642 (comment) — the previous attempt (lowering the 200ms mutation-observer settle to 0ms) showed no measurable speedup because that timer is gated behind
renderFinished()and re-armed per quiet period, not paid per render. The leading rAF was called out there as a better target.Risk
whenDOMUpdated()(Render.ts:114) still uses rAF — left untouched here to keep the diff minimal and isolate the signal.