-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Performance issue with React #669
Comments
I think it would be highly beneficial to support a |
I've been investigating a similar performance issue. Perhaps this is my problem too... |
|
You might be interested in this #604 (comment) I'm testing React (and others memory hungry function). |
I cloned the above repo and hacked away at it for a while. One initial finding is that if I remove the requirement to transpile the react component (by writing it using vanilla js), and remove That's a drastic improvement in performance. The takeaway here is that each and every fork has to load it's own copy of babel-register, and since babel is so big, it makes it take over twice as long to run the tests. |
@spudly
And import foo from '../build/foo.js' That's definitely not ideal, but you get to keep writing in ES2015 (:+1:), and there is a very good chance we will improve this performance bottleneck in the future. |
@spudly @jamestalmage that's a good point and def removing the babel step will help a lot. But in the other hand, tape and mocha are also transpiling the source code, but they manage to keep it very fast. But the issue #577 looks very promising thou. |
That actually depends on your test layout. If you have a few test files with lots of slow tests in each file, then AVA still is faster even though you need to load Also, I would try on Node |
@MicheleBertoli thanks for raising this and pushing AVA to its limits :) As mentioned #577 discusses ways to avoid the per-fork |
For the babel problem, I found this interesting project https://github.com/hayeah/babel-fast-presets Less files to load when boostraping babel |
Description
We started using AVA in our application and we found that the more React components we tested, the slower the tests became.
Obviously, we expected a small increase for each test but
120s
for one hundred files seemed too much.So, I created a simple test case to make some benchmarks:
https://github.com/MicheleBertoli/react-test-perf
Are we doing something wrong?
Is there a way to optimise the execution?
It looks like the largest amount of time is spent even before running the tests (maybe transpiling?).
Environment
Node.js v5.7.1
darwin 14.5.0
The text was updated successfully, but these errors were encountered: