New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
perf: add js-framework-benchmark tests #4069
Conversation
await add(); | ||
}, | ||
} | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All of these tests are adapted from https://github.com/krausest/js-framework-benchmark/blob/6c9f43f62604faa42bc7ddce634fde5a2e8b6eb7/webdriver-ts/src/benchmarksPuppeteer.ts
return [ | ||
action, | ||
async () => { | ||
elm.querySelector(id).click(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could extract out these querySelector
s so that we don't pay the cost in the actual benchmark run, but 1) it doesn't seem to affect the numbers much, and 2) js-framework-benchmark
seems to be implicitly doing this as well (assuming that WebDriver/Puppeteer delegate out to document.querySelector
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks for adding these!
Details
As we track our progress with fine-grained reactivity (#3624), I think it would be helpful to have the actual
js-framework-benchmark
benchmarks in our local benchmarks. Otherwise, it's kind of a pain to set upjs-framework-benchmark
itself, link it to LWC, and run it to see the results.This PR is my attempt to replicate as closely as possible what
js-framework-benchmark
is doing. A few limitations:js-framework-benchmark
but are slightly different.Despite these limitations, I still think this is worth doing, at least to see our historical trend over time as we try to improve these benchmark results.
Does this pull request introduce a breaking change?
Does this pull request introduce an observable change?