-
Notifications
You must be signed in to change notification settings - Fork 83
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
Fix extremely slow tests #403
Comments
One workaround is to run tests in release mode |
@vmx It's a good idea but I'd be careful with adding only
By the way, could you share how did you obtain such nicely formatted results? |
Yes, one has to be careful. Though I guess CI still runs in non-release mode, so those errors would be caught there. |
Yeah, this needs to be actioned on -- I think one immediate action might be to see if the VM can be passed by reference in the itest harness. |
I've just checked, for the moment (at least on my machine) adding optimization flags will not significantly cut the testing stage time because of the increased compilation overhead. Clean build & test with |
This is starting to get really annoying. CI can take 30m. One solution would be to run different test types in different CI jobs so we can get some parallelism.
I worked with @arajasek on this, but it didn't help. We'll probably need to profile a bit to figure out what's actually slowing us down here. |
Here is a list of slowest tests:
|
@anorth What I figure out with some logs for the slowest test function gives two aspect reasons to show:
As its hardly to speed up the cron method, maybe is there any way to reduce the loop times with no effect to the testing purpose. |
Unfortunately, that's really tricky. We might be able to just skip a bunch of cron ticks, but the system doesn't expect that and it probably won't work. |
Don't we implement cron catchup? If so it should be safe enough to skip in increments of 15-20 epochs or maybe even more. |
Some of the code may rely on the every-epoch behaviour. I know I advocated for simplifying to do so once that behaviour was reliable. |
I don't think skipping epochs is a viable approach, but we may be able to at least optimize this behavior. |
We could also look into:
|
I was able to save 40% with #585 but I still think there is something wrong with the test. Edit: I got another 32% (total 56% improvement) with an additional commit. |
I'm attaching a flamegraph of the |
@jennijuju I wasn't planning to work on it much more right now. Someone still needs to analyse why the test is so slow, there has to be another underlying reason. Also, we already skip across epochs, we call cron at the end of the deadline and then at the start of the deadline. |
Some of the tests ported from specs-actors run very slowly, taking minutes. This is too slow for a dev cycle except as a final pre-PR or CI run. I haven't investigated why they're slow. I would expect that almost all unit tests are very fast, though there may be some scenario tests that are slower.
Timing information on my laptop are here (download the file to view in browser).
The text was updated successfully, but these errors were encountered: