[DRAFT] chore(LTRAC-633): add messageformat candidates benchmark script#429
Draft
bc-yevhenii-buliuk wants to merge 1 commit intomasterfrom
Draft
[DRAFT] chore(LTRAC-633): add messageformat candidates benchmark script#429bc-yevhenii-buliuk wants to merge 1 commit intomasterfrom
bc-yevhenii-buliuk wants to merge 1 commit intomasterfrom
Conversation
ae86787 to
39e4503
Compare
39e4503 to
a8e9653
Compare
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.
What? Why?
This PR adds benchmark scripts and results to compare MF library candidates (current
messageformat@0.3.1 (Current),@messageformat/icu-messageformat-1 (C1),intl-messageformat (C2),icu-minify (C3)) on realistic ICU strings from the Cornerstone theme.What's included:
npm run benchmark:mf— measures three scenarios separately on 10 individual fixtures: compile-only, render-only (compile once per case, timed format only), and full compile+render per iteration.npm run benchmark:mf-cornerstone— runs all three scenarios over the entire Cornerstone lang/en.json (778 strings per iteration), simulating a real full-page render cycle.Why: isolating compile vs render costs matters because production caches the compiled handle within a request — so the hot path is render-only for repeated keys, while the first call per key pays the full cycle. CF Worker may additionally support pre-compiling at theme deploy time, making render-only the dominant scenario there.
How was it tested?
N/A