Skip to content

bench: serve dist/ ourselves; tachometer's server corrupts wasm - #9

Merged
lannbot merged 5 commits into
mainfrom
bench-diag
Sep 6, 2026
Merged

bench: serve dist/ ourselves; tachometer's server corrupts wasm#9
lannbot merged 5 commits into
mainfrom
bench-diag

Conversation

@lannbot

@lannbot lannbot commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

The first two `bench.yml` runs on main failed with every sample timing out. Two causes, found by replicating tachometer's flow step by step on an x86 runner (this arm64 box cannot run chromedriver):

  1. tachometer's server reserves `/bench.js` for its callback-mode helper — our bundle of that name never loaded (fixed in bench: rename the runner bundle; tachometer's server shadows /bench.js #8).
  2. With its response cache on (always, outside manual mode) tachometer's server reads bodies as text and re-encodes them: the 533,697-byte component was served as 644,034 bytes and never instantiated.

Fix: `bench/run.ts` serves `dist/` on an ephemeral Deno file server and hands tachometer remote URLs, so tachometer starts no server at all (also sidesteps the koa-node-resolve rewrite of served JS). The in-page runner now stops timing at commit rather than the next animation frame: the final DOM is identical across variants so paint is not a differentiator, and rAF is unreliable in tachometer's `window.open` popups.

Verified on a runner via a temporary diagnostic workflow (removed in the last commit): tachometer produced a result table for `dioxus-bench/native/direct/create-1k`.

tachometer's static server reads responses as text when its cache is on
(always, outside manual mode) and re-encodes them: the 533,697-byte
component came out as 644,034 bytes and never instantiated, so every
sample timed out. Benchmarks are now remote URLs against an ephemeral
Deno file server started by bench/run.ts, which also sidesteps the
reserved /bench.js path and the koa-node-resolve rewrite of served JS.
The runner also stops timing at commit rather than the next animation
frame: the final DOM is identical across variants, so paint is not a
differentiator, and rAF is not reliable in tachometer's popup windows.
@lannbot
lannbot merged commit b649436 into main Sep 6, 2026
1 check passed
@lannbot
lannbot deleted the bench-diag branch September 6, 2026 16:15
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.

2 participants