add mitata harness for precompile (parse/normalize/precompile)#21316
Merged
NullVoxPopuli merged 1 commit intoemberjs:mainfrom Apr 16, 2026
Merged
add mitata harness for precompile (parse/normalize/precompile)#21316NullVoxPopuli merged 1 commit intoemberjs:mainfrom
NullVoxPopuli merged 1 commit intoemberjs:mainfrom
Conversation
Contributor
|
this is not temporary! we'll use this a lot with changes to the parser |
Contributor
Author
|
@NullVoxPopuli ok, makes sense. In that regard – I was questioning wether to add it in the smoke-test dir instead? |
Contributor
|
it should probably be in the bin directory I think? |
4737760 to
8147e49
Compare
Contributor
Author
|
ok, yes, did that now. also renamed to |
Reproducible benchmark for the template compile pipeline. Runs three phases at three fixture sizes: - parse (preprocess, HBS → ASTv1 — @glimmer/syntax) - normalize (ASTv1 → ASTv2 — @glimmer/syntax, loc-conversion hot path) - precompile (full ember-template-compiler entry, all phases + plugins) Sizes: small (~1.5k chars), medium (small × 3), large (small × 22, ~33k chars — scale of the largest real route templates, e.g. Discourse's admin-user/index.gjs). Run: pnpm build pnpm bench:precompile To compare branches, check out each branch, build, run the bench, and diff the ms/iter numbers. Emits mitata's standard ms/iter + boxplot + summary output.
8147e49 to
47e2535
Compare
NullVoxPopuli
approved these changes
Apr 16, 2026
Contributor
NullVoxPopuli
left a comment
There was a problem hiding this comment.
beautiful, thank you <3
This was referenced Apr 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Split out from #21314 so reviewers can run the bench on
mainand on any perf branch independently.Adds a reproducible mitata harness for the template compile pipeline:
parse—preprocess(HBS → ASTv1,@glimmer/syntax)normalize—normalize(new src.Source(src))(ASTv1 → ASTv2,@glimmer/syntax, loc-conversion hot path)precompile— fullember-template-compilerentry (all phases + ember AST plugins)Three fixture sizes — small (~1.5k chars), medium (small × 3), large (small × 22, ~33k chars, scale of the largest real route templates, e.g. Discourse's
admin-user/index.gjs).Run:
To compare branches, check out each branch, build, run the bench, and diff the ms/iter numbers. Emits mitata's standard ms/iter + boxplot + summary output.
Scope
bin/precompile.bench.mjs— new bench harness (83 lines), sibling to existingbin/benchmark.mjspackage.json— addsbench:precompilescript andmitatadevDependencypnpm-lock.yaml— lockfile update for mitataNo runtime or library code changes. Public-API-only — works on any branch.
Test plan
pnpm install && pnpm build && pnpm bench:precompileruns to completion onmain