Skip to content

A turn names a callback's microtasks and its slowest finished step - #11

Merged
explodi merged 1 commit into
mainfrom
from-vendored-mwdvvf4c
Nov 12, 2026
Merged

explodi merged 1 commit into
mainfrom
from-vendored-mwdvvf4c

Conversation

@explodi

@explodi explodi commented Nov 12, 2026

Copy link
Copy Markdown
Owner

From the vendored copy in a game, three files under src/js and its test.

  • Once a timer, immediate or frame callback returns, the microtasks it queued are reported as <name> > microtasks in Host::Turn::callback. React's synchronous renders run there, and before this they were filed under the callback's own name.
  • Each turn records its longest finished step and how long it ran (Turn::slowestStep, slowestStepMs), so a watcher that looks late in a turn can still name the step that took the time.
  • The Turn initializer lists every field, which GCC and the NDK's clang require under -Werror.

Checks

  • bureau_js_tests: 15 cases pass on macOS, with the new "a held frame names its callback's microtasks apart from it" and the extended "a held turn times its step apart from the steps before it".
  • deno install --frozen, fmt, lint, deno task check and deno task test pass on this branch.
  • Not built on Linux, Windows or Android.

Once a timer, immediate or frame callback returns, the microtasks it
queued run as "<name> > microtasks", so a watcher can tell the callback
from the renders it set off. Each turn also records its longest finished
step and how long it ran (Turn::slowestStep, slowestStepMs).
@explodi
explodi merged commit eb1b47f into main Nov 12, 2026
1 check passed
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