-
-
Notifications
You must be signed in to change notification settings - Fork 9k
Description
Vue version
@vue/reactivity latest v3.5.5
Note that this issue does not use any other Vue packages but rather only relies on @vue/reactivity directly.
Link to minimal reproduction
Steps to reproduce
- Checkout https://github.com/transitive-bullshit/js-reactivity-benchmark and switch to the minimal repro branch
feature/minimal-issues-repro-vue-reactivitybranch - Run
pnpm install - Run
pnpm testto make sure everything's working locally - Run
pnpm benchto reproduce the issue
When you run the benchmark, the @vue/reactivity adapter will hang on this line.
All other benchmark tests work fine, so I've removed them from this branch. The benchmark stress test is pretty simple. It is adapted from the unit tests in cellx. It creates a series of N layers, each containing 4 computed properties depending on the previous layer's signal values. It then performs a read from the last layer and makes sure that the value matches the expected value.
@vue/reactivity is the only framework to fail this particular test, and what makes me even more sure that this may be a bug in Vue is that if I remove these 4 effect lines, then the benchmark tests seem to run fine.
What is expected?
The benchmark test should run fine, with each one completing in a few seconds at most.
What is actually happening?
The benchmark test for @vue/reactivity hangs as described above.
System Info
- @vue/reactivity latest v3.5.5
- node v22.4.1
- macos sonoma 14.5Any additional comments?
I discovered this issue while deep-diving on a comparison of the most popular, standalone TS reactivity libs.
During my deep-dive, I wanted to benchmark all of them and created a fork of @milomg's excellent js-reactivity-benchmark, which includes dozens of benchmarks and stress tests.
I'll also note that @vue/reactivity also hangs on the largest dynamic stress test, which I have commented out in src/index.ts at the moment to focus on the simpler cellx stress test.
Given that @vue/reactivity is the only framework to encounter an issue running the cellx benchmark, I figure it could either be a rare bug in @vue/reactivity or a bug in my benchmark adapter. If you see anything that could be improved with the @vue/reactivity adapter for these benchmarks, please let me know.
Thanks! 🙏
