-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Too slow in large projects #1418
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
Comments
Maybe related to several other issues? |
I added a branch which uses stricter paths and should ignore the other files. https://github.com/pixelass/ava-xo-test/tree/direct-path Config:https://github.com/pixelass/ava-xo-test/blob/direct-path/package.json#L43-L61 {
"files": [
"./one/a/b/c/d/e/f/g/h/i/j/this-is-it/**/tests/**/*.js"
],
"source": [
"./one/a/b/c/d/e/f/g/h/i/j/this-is-it/**/*.js"
],
} |
related to xojs/xo#234 |
I'm also finding AVA way too slow on larger projects. |
👍 Considering we initially adopted AVA for the speed benefits, these problems are a real concern for us - we may even have to migrate our tests back to mocha https://github.com/jfmengels/mocha-vs-ava-performance That would be a sad day, since the principles of this project are spot on IMO |
You should interpret that as there being no progress. That's frustrating (I'd love that project being finished too!) but there's only so many unpaid hours in a week.
There is a plan when it comes to precompilation performance. If somebody were to summarize the various issue threads so we can close them in favor of one summary issue that would be wonderful. |
I love Ava. especially in 'normal' projects. It just works (mostly 🤣) We ended up removing Ava from the "big project" that had the issue. Most developers in that project are not used to writing tests anyways, so I'm the only one frowning ;(. I added Ava to the project because it is so easy to write test and understand the possibilites. I'm happy to contribute. @novemberborn can you point me to a few or did you mean "search for" and then "summarize" 😇 ? |
Thanks @pixelass! It'll take me a while to do the searching myself (due to time limitations), so if you could start that'd be swell 👍 |
Performance issues: #594 These are issues either tagged with the label That's a lot of stuff to read before being able to summarize or sort out actual issues/suggestions and/or examples. How should we continue with this? My attempt would be to evaluate the listed issues and write a new issue that lists the different performance issues. I'd extract the gist of the problem (description/example/potential reason) and link the originals. Sadly I don't have a lot of time myself. The weekend is over so I won't be able to start for another week. I'm also really bad at reading long texts so this may take a while 😛. I skimmed a few of the issues and realized this might be quite a chunk of work. Any suggestions on the format are welcome. I'd really hate to spend time on something you can't use. |
Since xo and ava share a lot of underlying libs this may have some relevance. Ref: xojs/xo#212 |
@pixelass that sounds good. Perhaps you could publish a draft in a gist, so we can discuss it before creating the resulting issue? And no worries regarding time commitments. |
I also believe this is an important issue: #1320 (comment) Try this:
So in node_modules/ava/lib/ava-files.js I changed the helper patterns to: const defaultHelperPatterns = () => [
'{src,lib}/**/__tests__/helpers/**/*.js',
]; you need to adjust the glob for your project of course. |
@wmertens To confirm this fixed the issue for me too. Went from about 8 seconds to run my tests to around 500ms. |
Food for thought in the meantime, I swapped out the My library is a heavy ESM module (import/export everywhere) with ~280 unit tests, this is a tremendous win for me in terms of run time on tests. |
Description
I am using XO and Ava in a large project. Both packages are too slow to be used. I never actually tried to let them finish. I usually give up after 10+ minutes.
I first thought this might be related to globby: sindresorhus/globby#43
As mentioned in that issue I created a test source that reproduces this issue.
There is only one test file in the test-project.
The glob targets a folder that exists only once.
I will open a separate issue in XO if needed.
Test Source
Error Message & Stack Trace
Keeps doing this thing: 🤣
If using
--verbose
nothing happensConfig
https://github.com/pixelass/ava-xo-test/blob/master/package.json#L41-L59
Command-Line Arguments
https://github.com/pixelass/ava-xo-test/blob/master/package.json#L10
Relevant Links
Minimal reproduction:
https://github.com/pixelass/ava-xo-test/
Environment
Requested log:
The text was updated successfully, but these errors were encountered: