{"action":"opened","issue":{"url":"https://api.github.com/repos/sindresorhus/ava/issues/441","labels_url":"https://api.github.com/repos/sindresorhus/ava/issues/441/labels{/name}","comments_url":"https://api.github.com/repos/sindresorhus/ava/issues/441/comments","events_url":"https://api.github.com/repos/sindresorhus/ava/issues/441/events","html_url":"https://github.com/sindresorhus/ava/issues/441","id":127024472,"number":441,"title":"performance impact of paralell process on small projects (& switching tape to ava)","user":{"login":"thisconnect","id":546900,"avatar_url":"https://avatars.githubusercontent.com/u/546900?v=3","gravatar_id":"","url":"https://api.github.com/users/thisconnect","html_url":"https://github.com/thisconnect","followers_url":"https://api.github.com/users/thisconnect/followers","following_url":"https://api.github.com/users/thisconnect/following{/other_user}","gists_url":"https://api.github.com/users/thisconnect/gists{/gist_id}","starred_url":"https://api.github.com/users/thisconnect/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thisconnect/subscriptions","organizations_url":"https://api.github.com/users/thisconnect/orgs","repos_url":"https://api.github.com/users/thisconnect/repos","events_url":"https://api.github.com/users/thisconnect/events{/privacy}","received_events_url":"https://api.github.com/users/thisconnect/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-01-16T13:25:12Z","updated_at":"2016-01-16T13:25:12Z","closed_at":null,"body":"After my tape tests still passed but stopped exiting (for some reason?) I took the chance to switch to ava. My setup is 6 test files each testing on different git repositories, using nodegit (stuff like `git.commit`, or `git.diff`). Each test file has a setup test to clean up (usually removing the repo).\r\n\r\nSwitching from tape to ava was pretty straight forward. In my case always returning a promise, removing `.then(function(){ t.end(); })`, changing `t.equal` to `t.is`. Changing `t.error` to `t.fail` and removing `t.end()` in a few places. \r\nhttps://github.com/thisconnect/nodegit-kit/commit/ba360263c79a623820638e70b8846017a4a14b01\r\n\r\nWithin the test files the tests depend on each other, in other words within one file the test have to run in serial (using `test.serial`). The 6 test files however are totally independent of each other, so they can run in parallel. The overall 34 tests take a relatively short time to execute.\r\nhttps://travis-ci.org/thisconnect/nodegit-kit\r\n\r\nComparing running everything in serial (with one entry test file) vs. running the tests in parallel (using `ava test/test-*.js`). At this point I believe the cost of spawning multiple process is higher than running the tests in serial. Hoping my setup and time measuring is correct (on OSX using `time npm ...`). Does that make sense or am I doing something wrong?\r\n\r\nA side note, the tests do not use any ES2015 features, could it be that there is some additional cost for each process of babel stuff happening?\r\n\r\n```\r\ntime npm test\r\n\r\n> ava --verbose ./test/test.js\r\n\r\n\r\n  ✔ init setup\r\n  ✔ init error\r\n  ✔ init\r\n  ✔ init reinitialize\r\n  ✔ init bare\r\n  ✔ init without commit\r\n  ✔ open setup\r\n  ✔ open error\r\n  ✔ open should create a new repo\r\n  ✔ commit setup\r\n  ✔ commit three times\r\n  ✔ commit log\r\n  ✔ commit nothing\r\n  ✔ commit test log --abbrev-commit\r\n  ✔ get setup\r\n  ✔ get test\r\n  ✔ state setup\r\n  ✔ state get status\r\n  ✔ state get diff\r\n  ✔ state commit changes\r\n  ✔ state diff commit\r\n  ✔ state append but do not commit\r\n  ✔ state get diff HEAD~2\r\n  ✔ state get diff commit\r\n  ✔ config setup\r\n  ✔ config test init with local user\r\n  ✔ config test overwrite user\r\n  ✔ config core.autocrlf\r\n  ✔ config set a number (core.abbrev)\r\n  ✔ config get local user\r\n  ✔ config init without local user\r\n  ✔ config get user from repo without local user\r\n  ✔ config get global user\r\n  ✔ config get multiple global user configs\r\n\r\n  34 tests passed\r\n\r\n\r\nreal\t0m1.461s\r\nuser\t0m1.198s\r\nsys\t0m0.298s\r\n```\r\n\r\n```\r\ntime npm run test-parallel\r\n> ava --verbose ./test/test-*.js\r\n\r\n\r\n  ✔ commits › commit setup\r\n  ✔ open › open setup\r\n  ✔ open › open error\r\n  ✔ init › init setup (104ms)\r\n  ✔ init › init error\r\n  ✔ init › init\r\n  ✔ init › init reinitialize\r\n  ✔ init › init bare\r\n  ✔ commits › commit three times (129ms)\r\n  ✔ state › state setup (108ms)\r\n  ✔ init › init without commit\r\n  ✔ get › get setup (183ms)\r\n  ✔ config › config setup (180ms)\r\n  ✔ state › state get status\r\n  ✔ commits › commit log\r\n  ✔ state › state get diff\r\n  ✔ commits › commit nothing\r\n  ✔ open › open should create a new repo (138ms)\r\n  ✔ commits › commit test log --abbrev-commit\r\n  ✔ get › get test\r\n  ✔ config › config test init with local user\r\n  ✔ config › config test overwrite user\r\n  ✔ config › config core.autocrlf\r\n  ✔ config › config set a number (core.abbrev)\r\n  ✔ config › config get local user\r\n  ✔ config › config init without local user\r\n  ✔ config › config get user from repo without local user\r\n  ✔ config › config get global user\r\n  ✔ state › state commit changes\r\n  ✔ config › config get multiple global user configs\r\n  ✔ state › state diff commit\r\n  ✔ state › state append but do not commit\r\n  ✔ state › state get diff HEAD~2\r\n  ✔ state › state get diff commit\r\n\r\n  34 tests passed\r\n\r\nreal\t0m1.798s\r\nuser\t0m3.719s\r\nsys\t0m0.630s\r\n```\r\n"}}