-
Notifications
You must be signed in to change notification settings - Fork 3
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
Watch mode can get slow with heavier test setup scripts #20
Comments
@marcel Thanks for reporting this issue. Sounds like there should be an argument like I think Cheers |
In general I think watchmode might need a review and maybe a refactoring. It feels not yet as fast as it could be, since there is a hardcoded timespan of 20ms where filechanges are collected to avoid to early triggering/cancel on multiple filechanges. I guess there might be an improvement in this matters. |
@ddneat yes, afaik you can't do it with fork/spawn, so I was also thinking of watcher: I think most people use chokidar (https://github.com/paulmillr/chokidar) nowadays, have good experience with it too saw that mocha is basically clearing all paths their watcher watches, seems simple/smart on first thought: |
@marcelbeumer yes, looks great. Chokidar would for sure contribute greatly in terms of making tropic much more stable and performant! I would be happy to receive a pullrequest. I'm currently gathering a list of features/refactorings necessary to release tropic v1.0.0 within the next weeks and latest by early April. I feel highly motivated to push the state of tropic! Thanks for contributing! Cheers |
@marcelbeumer I just reviewed the jest docs and learned about Rather than What's your opinion? |
what kind of env values were you thinking of? |
Well Yes, going for non-isolated would be the more mocha compatible way and additionally increase performance as well. Having a performance increase, might be a great marketing argument. Therefore I would also see the benefit of having the non-isolated as the default and To summarise current insights:
Further point for performance increase:
|
Example: marcelbeumer/react-shared-state-hook#1
Because of the isolated test execution, jsdom and babel will be initialized each time the watcher re-runs a test file, which takes a second or two on my machine.
The text was updated successfully, but these errors were encountered: