-
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
Implement pool for managing forks #718
Comments
Currently blocked by #696. |
I started |
We're chasing down huge memory usage in our project breaking CircleCI. With a pool we can certainly help clamp down on runaway peak usage (I'm still going to chase down other ideas). I do notice there is The Blocker™: Would a default behavior of unlimited sized pool maintaining current behavior and adding a flag for limiting the pool with the caveat that test.only won't work be acceptable as an interim (beta) behavior? If so would extra hands (read: my time) integrating @jamestalmage's async-task-pool be useful or has enough work been started that my time would be wasted effort? |
@vdemedes brought up a good point that
|
Sorry for the incomplete answer, got called away.
Yes.
Yes, definitely (but use Bluebird's concurrency controls). However, it's going to take a pretty deep dive into AVA's codebase, and it's a fairly complex issue. We're also going to have strong opinions on how it impacts the programmatic API. I'm not trying to scare you off helping (we would love it, really!). I just want you to know what you're getting into. |
@jamestalmage I have a bit of time and have been in worse codebases ;) Will find you on the gitter chat at some point, I should have a minimal POC and thoughts to run by today. |
@jamestalmage So I pulled this minimal proof of concept out of my morning just to verify the approach. I think I should be able to pull out the final returned promise into two separate logic paths and use the new "pooled" version when a pool size is requested, leaving default behavior in. The (I haven't pushed any of this to my fork yet because I wanted to get opinions before I moved forward. Currently I'm symlinking the latest master into the node_modules folder of our project and running our test suite as the "real world" example 😬) |
Can you just open a PR? It's easier for us to evaluate that way |
@jamestalmage certainly, I'll flesh it out some more. I'll indicate its also a POC |
Is this resolved by #791 ? |
Yes, thank you for noticing @bettiolo 👍 |
For #78 we'll end up limiting the number of concurrent forks. We should implement a pool of forks that the Api can use to run each test file.
Here's a rough sketch of a possible implementation:
The text was updated successfully, but these errors were encountered: