Skip to content

Fix js-framework-benchmark harness and add fast pnpm bench-ui preset - #11454

Merged
tim-smart merged 8 commits into
mainfrom
agent/effect-bot/fca824efeaad
Dec 3, 2026
Merged

tim-smart merged 8 commits into
mainfrom
agent/effect-bot/fca824efeaad

Conversation

@effect-bot

Copy link
Copy Markdown
Contributor

Summary

Fixes the Effect UI js-framework-benchmark harness for the effect monorepo and adds a fast (~50s) pnpm bench-ui preset for iterating on UI performance locally.

js-framework-benchmark harness (packages/effect/benchmark/ui/js-framework-benchmark)

  • Fix repository root resolution ($here/../../../../..) and build/pack packages/effect into effect.tgz, deriving frameworkVersion from packages/effect/package.json + commit SHA.
  • Replace the broken "effect/ui" + npm "effect": "4.1.6" dependencies in effect-ui/package.json with "effect": "file:effect.tgz" and update repo URLs to Effect-TS/effect.
  • Pin Foldkit's npm Effect dependencies (effect@4.1.6, @effect/platform-browser@4.1.6), add FRAMEWORKS="vanillajs effect-ui" subset support, and restore Foldkit's manifests on exit after guarding against pre-existing unstaged changes (avoiding git checkout --force).
  • Update README.md and summarize.mjs paths from packages/ui/benchmark/... to packages/effect/benchmark/ui/....

Fast pnpm bench-ui rows preset (packages/effect/benchmark/ui/rows & headless-rows)

  • Add root script pnpm bench-ui timing all nine js-framework-benchmark operations on the lazy variant in ~50 seconds with cross-origin isolated pages (5 µs timer resolution).
  • Add --base <ref> to bundle the working tree's entry.ts and harness.ts against the ref's packages/effect/src in an isolated temporary directory (serving bundles from memory so concurrent runs don't clobber each other) and interleave base vs head rounds in one session.
  • Fix stale packages/ui paths in rows/run.mjs, rows/react.mjs, and headless-rows/run.mjs, and document usage and noise caveats in rows/README.md.

Closes EFF-5225

…mparison

pnpm bench-ui times the nine js-framework-benchmark operations on the lazy
variant in about 50 seconds. --base <ref> bundles the ref's packages/effect/src
from git archive and interleaves it with the working tree in one session.
Pages are cross-origin isolated for 5 µs timer resolution, and the stale
packages/ui paths (including React's node_modules) now point at packages/effect.
…emory

--base now builds this checkout's entry.ts and harness.ts against the ref's
packages/effect/src, so both sides run the same workload and an entry that
uses an export the ref lacks fails the build. The extraction goes to a
temporary directory per run and bundles stay in memory, so concurrent runs
can't swap each other's baseline. The README qualifies the noise figures.
@changeset-bot

changeset-bot Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: bb39946

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@effect-janitor effect-janitor Bot added the 4.0 label Dec 3, 2026
@tim-smart
tim-smart enabled auto-merge (squash) December 3, 2026 09:57
@tim-smart
tim-smart merged commit 07c9262 into main Dec 3, 2026
25 checks passed
@tim-smart
tim-smart deleted the agent/effect-bot/fca824efeaad branch December 3, 2026 09:59
@github-actions

github-actions Bot commented Dec 3, 2026

Copy link
Copy Markdown
Contributor

Bundle Size Analysis

Generated from PR build output; treat the content below as untrusted.

File Name Current Size Previous Size Difference
arbitrary-combinators.ts 40.55 KB 40.55 KB 0.00 KB (0.00%)
basic.ts 6.80 KB 6.80 KB 0.00 KB (0.00%)
batching.ts 12.03 KB 12.03 KB 0.00 KB (0.00%)
brand.ts 7.03 KB 7.03 KB 0.00 KB (0.00%)
cache.ts 12.30 KB 12.30 KB 0.00 KB (0.00%)
config.ts 24.02 KB 24.02 KB 0.00 KB (0.00%)
differ.ts 22.88 KB 22.88 KB 0.00 KB (0.00%)
http-client.ts 29.03 KB 29.03 KB 0.00 KB (0.00%)
http-router.ts 39.70 KB 39.70 KB 0.00 KB (0.00%)
logger.ts 12.46 KB 12.46 KB 0.00 KB (0.00%)
metric.ts 10.29 KB 10.29 KB 0.00 KB (0.00%)
optic.ts 7.26 KB 7.26 KB 0.00 KB (0.00%)
pubsub.ts 17.02 KB 17.02 KB 0.00 KB (0.00%)
queue.ts 13.83 KB 13.83 KB 0.00 KB (0.00%)
schedule.ts 12.59 KB 12.59 KB 0.00 KB (0.00%)
schema-bigdecimal.ts 14.62 KB 14.62 KB 0.00 KB (0.00%)
schema-binary.ts 43.61 KB 43.61 KB 0.00 KB (0.00%)
schema-class.ts 22.61 KB 22.61 KB 0.00 KB (0.00%)
schema-codegen.ts 33.98 KB 33.98 KB 0.00 KB (0.00%)
schema-fromJsonSchemaDocument.ts 31.06 KB 31.06 KB 0.00 KB (0.00%)
schema-representation-roundtrip.ts 28.80 KB 28.80 KB 0.00 KB (0.00%)
schema-string-transformation.ts 16.39 KB 16.39 KB 0.00 KB (0.00%)
schema-string.ts 12.89 KB 12.89 KB 0.00 KB (0.00%)
schema-template-literal.ts 16.99 KB 16.99 KB 0.00 KB (0.00%)
schema-toArbitrary.ts 40.12 KB 40.12 KB 0.00 KB (0.00%)
schema-toCodecJson.ts 21.77 KB 21.77 KB 0.00 KB (0.00%)
schema-toEquivalence.ts 21.93 KB 21.93 KB 0.00 KB (0.00%)
schema-toFormatter.ts 22.04 KB 22.04 KB 0.00 KB (0.00%)
schema-toJsonSchemaDocument.ts 27.05 KB 27.05 KB 0.00 KB (0.00%)
schema-toRepresentation.ts 22.08 KB 22.08 KB 0.00 KB (0.00%)
schema.ts 21.73 KB 21.73 KB 0.00 KB (0.00%)
stm.ts 15.08 KB 15.08 KB 0.00 KB (0.00%)
stream.ts 10.83 KB 10.83 KB 0.00 KB (0.00%)
supervisor.ts 12.27 KB 12.27 KB 0.00 KB (0.00%)

UI Bundle Size

Vite 8.4.0/Rolldown, production, default Oxc minification, es2023, ES modules, gzip level 9 per chunk. effect 4.2.0, Node v26.12.1. Effect-only client: 27528 B gzip (Δ 0 B vs base).

App Chunks Raw bytes Gzip bytes Added gzip B Δ raw bytes Δ gzip bytes
counter 1 176280 60862 33334 0 0
features 1 185934 64361 36833 0 0
menu 1 290721 99073 71545 0 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants