Skip to content
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

chore: enable WASM support #430

Merged
merged 2 commits into from
Dec 5, 2023
Merged

Conversation

mdjastrzebski
Copy link
Member

Summary

This PR adds support for Reassure --enable-wasm option that would replace --jitless flag for --no-opt --no-sparkplug flags intended to disable Turbo Fan optimizing compiler and Sparkplug non-optimizing compiler in order to maintain execution time stability provided by JIT-less mode.

Resolves #426
Resolves #421

Test plan

Copy link

changeset-bot bot commented Dec 4, 2023

🦋 Changeset detected

Latest commit: dec8791

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 2 packages
Name Type
@callstack/reassure-cli Patch
reassure Patch

Not sure what this means? Click here to learn what changesets are.

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

Copy link
Contributor

github-actions bot commented Dec 4, 2023

Performance Comparison Report

  • Current: bea2cc9 - 2023-12-05 17:05:40Z
  • Baseline: main (1205605) - 2023-12-05 17:04:50Z

Significant Changes To Duration

Name Type Duration Count
Other Component 10 legacy scenario render 120.1 ms → 127.4 ms (+7.3 ms, +6.1%) 🔴 4 → 4
fib 30 function 90.2 ms → 85.3 ms (-5.0 ms, -5.5%) 🟢 1 → 1
Show details
Name Type Duration Count
Other Component 10 legacy scenario render Baseline
Mean: 120.1 ms
Stdev: 5.4 ms (4.5%)
Runs: 132 124 122 121 119 119 118 118 117 111

Current
Mean: 127.4 ms
Stdev: 12.9 ms (10.2%)
Runs: 154 143 135 126 126 122 119 119 118 112
Baseline
Mean: 4
Stdev: 0 (0.0%)
Runs: 4 4 4 4 4 4 4 4 4 4

Current
Mean: 4
Stdev: 0 (0.0%)
Runs: 4 4 4 4 4 4 4 4 4 4
fib 30 function Baseline
Mean: 90.2 ms
Stdev: 0.2 ms (0.2%)
Runs: 90.6 90.5 90.4 90.2 90.2 90.2 90.2 90.1 90.0 89.9

Current
Mean: 85.3 ms
Stdev: 0.7 ms (0.9%)
Runs: 87.1 85.7 85.3 85.3 85.2 85.2 85.1 84.6 84.6 84.5
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1

Meaningless Changes To Duration

Show entries
Name Type Duration Count
Async Component render 199.5 ms → 196.3 ms (-3.2 ms, -1.6%) 7 → 7
fib 31 function 154.0 ms → 150.8 ms (-3.2 ms, -2.1%) 1 → 1
fib 32 function 245.7 ms → 247.6 ms (+1.9 ms, +0.8%) 1 → 1
Other Component 10 render 116.8 ms → 119.7 ms (+2.9 ms, +2.5%) 4 → 4
Other Component 20 render 120.8 ms → 119.3 ms (-1.6 ms, -1.3%) 4 → 4
Show details
Name Type Duration Count
Async Component render Baseline
Mean: 199.5 ms
Stdev: 8.3 ms (4.1%)
Runs: 217 205 204 203 199 198 197 192 190 190

Current
Mean: 196.3 ms
Stdev: 7.1 ms (3.6%)
Runs: 212 202 198 197 197 195 194 193 189 186
Baseline
Mean: 7
Stdev: 0 (0.0%)
Runs: 7 7 7 7 7 7 7 7 7 7

Current
Mean: 7
Stdev: 0 (0.0%)
Runs: 7 7 7 7 7 7 7 7 7 7
fib 31 function Baseline
Mean: 154.0 ms
Stdev: 0.8 ms (0.5%)
Runs: 156.3 154.1 153.9 153.8 153.8 153.8 153.8 153.7 153.7 153.6

Current
Mean: 150.8 ms
Stdev: 1.4 ms (0.9%)
Runs: 152.7 152.5 152.0 151.7 150.8 150.6 150.2 150.0 149.2 148.8
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
fib 32 function Baseline
Mean: 245.7 ms
Stdev: 2.9 ms (1.2%)
Runs: 248.5 247.1 246.9 246.9 246.8 246.7 246.6 246.6 240.5 240.0

Current
Mean: 247.6 ms
Stdev: 0.3 ms (0.1%)
Runs: 247.9 247.9 247.7 247.7 247.6 247.6 247.6 247.4 247.4 247.0
Baseline
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1

Current
Mean: 1
Stdev: 0 (0.0%)
Runs: 1 1 1 1 1 1 1 1 1 1
Other Component 10 render Baseline
Mean: 116.8 ms
Stdev: 5.5 ms (4.7%)
Runs: 129 124 117 116 115 115 115 114 112 111

Current
Mean: 119.7 ms
Stdev: 3.4 ms (2.8%)
Runs: 124 123 122 122 122 119 119 116 115 115
Baseline
Mean: 4
Stdev: 0 (0.0%)
Runs: 4 4 4 4 4 4 4 4 4 4

Current
Mean: 4
Stdev: 0 (0.0%)
Runs: 4 4 4 4 4 4 4 4 4 4
Other Component 20 render Baseline
Mean: 120.8 ms
Stdev: 5.8 ms (4.8%)
Runs: 136 132 126 126 124 123 122 122 122 120 118 118 117 117 117 117 117 116 114 113

Current
Mean: 119.3 ms
Stdev: 4.7 ms (3.9%)
Runs: 127 125 125 124 123 122 122 121 121 121 118 118 118 117 116 115 115 115 114 108
Baseline
Mean: 4
Stdev: 0 (0.0%)
Runs: 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4

Current
Mean: 4
Stdev: 0 (0.0%)
Runs: 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4 4

Changes To Count

There are no entries

Added Scenarios

There are no entries

Removed Scenarios

There are no entries

Generated by 🚫 dangerJS against dec8791

@andrei-zgirvaci
Copy link

andrei-zgirvaci commented Dec 4, 2023

@mdjastrzebski thanks for the fix. Indeed, running node with the options: --no-opt --no-sparkplug fixes the previous issue I had with MSW.

I also noticed from running node --v8-options on node LTS: v20 that the --opt option is just an alias for --turbofan. Maybe we can replace the --no-opt option with --no-turbofan to keep it more consistent with the second option: --no-sparkplug?

Also, I ran some tests with the runs option set to 100 and MSW disabled to keep it consistent. Here are the following results:

  1. Took a baseline with the --jitless option.

  2. Ran the same test with the option --no-turbofan a few times: ~-10%

- <CityWeather /> should render the component without significant performance changes [render]: 0.8 ms → 0.8 ms (-0.1 ms, -9.6%)  | 1 → 1
  1. Ran the same test with the option --no-turbofan --no-sparkplug a few times: ~+5%
- <CityWeather /> should render the component without significant performance changes [render]: 0.8 ms → 0.9 ms (+0.0 ms, +4.8%)  | 1 → 1

To me it seems that adding --no-turbofan --no-sparkplug options keeps the tests pretty close to the --jitless option. I also ran the check-stability command and everything seemed okay to me!

P.S. I am no expert in reassure so please correct me if I haven't tested this properly!

Copy link

@andrei-zgirvaci andrei-zgirvaci left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me! 🎉

@mdjastrzebski mdjastrzebski merged commit 8ca46a4 into main Dec 5, 2023
@mdjastrzebski mdjastrzebski deleted the feat/unstable-avoid-jitless-flag branch December 5, 2023 17:07
@mdjastrzebski
Copy link
Member Author

🎉 This PR has been released in v0.10.2!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Node's fetch fails because of the --jitless flag [FEATURE] Support Running With Vitest Instead of Jest
3 participants