bi-11 step 01 — Ordering and priority, predicted then measured
Goal
Break the single-FIFO mental model with your own measurements.
Tasks
- Prerequisite check:
fe-01complete. If not, stop and do it first. - Post work via
setTimeout(0),MessageChannel, andscheduler.postTaskat several priorities. Register a click handler. Predict the execution order in writing. - Run under synthetic main-thread load. Record actual order and input delay.
- Demonstrate that a
setTimeoutregistered before a click can run after it. Explain via task sources and priority. - Measure the
setTimeoutclamp: nest timers past depth 5 and confirm the ~4 ms floor. Compute the resulting chunks-per-second ceiling.
Done when
- Predicted vs actual ordering table
- Timer-after-click demonstrated
- Clamp measured and its throughput ceiling computed