winglang / wing

A programming language for the cloud ☁️ A unified programming model, combining infrastructure and runtime code into one language ⚡
https://winglang.io
Other
4.76k stars 187 forks source link

feat: improve simulator iteration speeds #6577

Closed Chriscbr closed 1 month ago

Chriscbr commented 1 month ago

Closes #6540

The main thrust of the change in this PR is to reduce the time spent re-bundling inflight JavaScript code with esbuild. To do that, we take a rough heuristic that most of the time, if none of the files that go into a bundle have changed, then the bundle doesn't need to be regenerated. There are technically some edge cases where this may not be the case, but the heuristic should be accurate enough to handle most local iteration scenarios.

Checklist

By submitting this pull request, I confirm that my contribution is made under the terms of the Wing Cloud Contribution License.

github-actions[bot] commented 1 month ago

Thanks for opening this pull request! :tada: Please consult the contributing guidelines for details on how to contribute to this project. If you need any assistance, don't hesitate to ping the relevant owner over Discord.

Topic Owner
Wing SDK and utility APIs @chriscbr
Wing Console @ainvoner, @skyrpex, @polamoros
JSON, structs, primitives and collections @hasanaburayyan
Platforms and plugins @hasanaburayyan
Frontend resources (website, react, etc) @tsuf239
Language design @chriscbr
VSCode extension and language server @markmcculloh
Compiler architecture, inflights, lifting @yoav-steinberg
Wing Testing Framework @tsuf239
Wing CLI @markmcculloh
Build system, dev environment, releases @markmcculloh
Library Ecosystem @chriscbr
Documentation @hasanaburayyan
SDK test suite @tsuf239
Examples @hasanaburayyan
Wing Playground @eladcon
monadabot commented 1 month ago

Console preview environment is available at https://wing-console-pr-6577.fly.dev :rocket:

Last Updated (UTC) 2024-05-28 19:49
monadabot commented 1 month ago

Benchmarks

Comparison to Baseline 🟥⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜⬜ | Benchmark | Before | After | Change | | :-- | --: | --: | --: | | version | 56ms±0.55 | 58ms±0.46 | +3ms (+4.81%)🟥 | | functions_10.test.w -t sim | 495ms±28.65 | 501ms±9.51 | +6ms (+1.22%)⬜ | | functions_10.test.w -t tf-aws | 2013ms±17.26 | 2063ms±13.51 | +49ms (+2.45%)⬜ | | hello_world.test.w -t sim | 397ms±4.22 | 403ms±6.75 | +6ms (+1.48%)⬜ | | hello_world.test.w -t tf-aws | 1427ms±7.38 | 1443ms±8.23 | +17ms (+1.18%)⬜ | | functions_1.test.w -t sim | 391ms±3.77 | 399ms±4.77 | +8ms (+2.16%)⬜ | | functions_1.test.w -t tf-aws | 811ms±3.56 | 820ms±6.45 | +9ms (+1.09%)⬜ | | jsii_big.test.w -t sim | 2776ms±12.6 | 2784ms±16.82 | +7ms (+0.26%)⬜ | | jsii_big.test.w -t tf-aws | 3006ms±14.01 | 2990ms±7.68 | -16ms (-0.52%)⬜ | | empty.test.w -t sim | 364ms±3.86 | 366ms±5.04 | +2ms (+0.55%)⬜ | | empty.test.w -t tf-aws | 602ms±4.76 | 597ms±2.84 | -6ms (-0.92%)⬜ | | jsii_small.test.w -t sim | 377ms±2.15 | 375ms±4.43 | -2ms (-0.41%)⬜ | | jsii_small.test.w -t tf-aws | 614ms±5.29 | 615ms±6.91 | +0ms (+0.04%)⬜ | ⬜ Within 1.5 standard deviations 🟩 Faster, Above 1.5 standard deviations 🟥 Slower, Above 1.5 standard deviations _Benchmarks may vary outside of normal expectations, especially when running in GitHub Actions CI._
Results |name|mean|min|max|moe|sd| |----|----|----|----|----|----| |version|58ms|57ms|59ms|0ms|1ms| |functions_10.test.w -t sim|501ms|485ms|524ms|10ms|13ms| |functions_10.test.w -t tf-aws|2063ms|2032ms|2100ms|14ms|19ms| |hello_world.test.w -t sim|403ms|390ms|423ms|7ms|9ms| |hello_world.test.w -t tf-aws|1443ms|1431ms|1470ms|8ms|12ms| |functions_1.test.w -t sim|399ms|389ms|408ms|5ms|7ms| |functions_1.test.w -t tf-aws|820ms|807ms|830ms|6ms|9ms| |jsii_big.test.w -t sim|2784ms|2759ms|2834ms|17ms|24ms| |jsii_big.test.w -t tf-aws|2990ms|2976ms|3012ms|8ms|11ms| |empty.test.w -t sim|366ms|351ms|375ms|5ms|7ms| |empty.test.w -t tf-aws|597ms|591ms|602ms|3ms|4ms| |jsii_small.test.w -t sim|375ms|366ms|385ms|4ms|6ms| |jsii_small.test.w -t tf-aws|615ms|602ms|637ms|7ms|10ms|
Last Updated (UTC) 2024-05-28 19:54
mergify[bot] commented 1 month ago

Thanks for contributing, @Chriscbr! This PR will now be added to the merge queue, or immediately merged if rybickic/iteration-speed is up-to-date with main and the queue is empty.

monadabot commented 1 month ago

Congrats! :rocket: This was released in Wing 0.74.21.