Skip to content

Support OutOfFrameExecutor in Web platform#2929

Open
ApoloApps wants to merge 7 commits intoJetBrains:jb-mainfrom
ApoloApps:webOutOfFrameExecutor
Open

Support OutOfFrameExecutor in Web platform#2929
ApoloApps wants to merge 7 commits intoJetBrains:jb-mainfrom
ApoloApps:webOutOfFrameExecutor

Conversation

@ApoloApps
Copy link
Copy Markdown

@ApoloApps ApoloApps commented Mar 28, 2026

Uses https://developer.mozilla.org/en-US/docs/Web/API/Scheduler/postTask with user-blocking (current frame drawing is not blocked, but it must run after it as per KDoc) option to follow OutOfFrameExecutor contract. Tracing correctly shows this behaviour with very good performance. This takes precedence over idle periods for LazyLayouts prefetch schedulers (also as per KDoc). PR for the latter
Works in every browser except Apple ones (Webkit Mac & IOS, similar to requestIdleCallback support) but it is a question of 'when it will be implemented' cause they have a positive position on the standard but, as always, they lag behind on implementing these useful APIs
Fixes https://youtrack.jetbrains.com/issue/CMP-7801/Support-OutOfFrameExecutor (only Web)

webFrameLifecycle

Release Notes

Features - Web

  • Added support to LazyLayouts to run some work without blocking current frame's painting

…me + MessageChannel to detect after frame paint and enqueue a high-priority work on the main thread following OutOfFrameExecutor contract
@ApoloApps ApoloApps marked this pull request as draft March 29, 2026 00:44
…he contract of OutOfFrameExecutor. Only active in places where it is supported
…st scheduling apis in Lazylayouts. It changes the number of items from 100 to 100000
@ApoloApps ApoloApps marked this pull request as ready for review March 29, 2026 19:27
@ApoloApps ApoloApps changed the title POC Support OutOfFrameExecutor in Web platform Support OutOfFrameExecutor in Web platform Mar 30, 2026
@kropp kropp requested review from eymar and svastven March 30, 2026 13:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant