Skip to content
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

childprocess slower than background_process #42

Closed
aslakhellesoy opened this issue Dec 26, 2010 · 4 comments
Closed

childprocess slower than background_process #42

aslakhellesoy opened this issue Dec 26, 2010 · 4 comments

Comments

@aslakhellesoy
Copy link
Contributor

After the switch to childprocess things are a lot slower. Compare cucumber's own features running with aruba 0.2.7 and 0.2.8:

aruba 0.2.7:

$ time cucumber features

26 scenarios (26 passed)
184 steps (184 passed)
0m19.330s

real    0m19.889s
user    0m15.434s
sys 0m3.922s

aruba 0.2.8:

$ time cucumber features

26 scenarios (26 passed)
184 steps (184 passed)
0m31.335s

real    0m31.895s
user    0m15.438s
sys 0m4.017s

Also see comment in #41 - the slowness is observable in aruba too. Since I'm running on OS X I'm not sure why things are slower - I suppose both background_process and childprocess use the same fork etc. methods? Or not?

Please close this issue if this can be resolved with a patch to childprocess.

@aslakhellesoy
Copy link
Contributor Author

Ouch. childprocess has a poll_for_exit method that sleeps. Not sure if that's it...

@msassak
Copy link
Member

msassak commented Dec 27, 2010

poll_for_exit was my first suspicion. I did add a sleep when reading output (patch to modify that coming soon) but that shouldn't add up to this much of a difference. I'll look into it and let you know.

@msassak
Copy link
Member

msassak commented Dec 28, 2010

I have a fix in my wait-for-io branch here: https://github.com/msassak/aruba/tree/wait-for-io

The problem was because I was stupidly waiting for IO whether the process was still running or not. I think I'll be able to improve this even more, but this helps considerably when running Aruba's own features. On my laptop it reduces runtime from 27 to 6 seconds.

@aslakhellesoy
Copy link
Contributor Author

Attribution. Closed by 23cd24e.

dchelimsky pushed a commit that referenced this issue Apr 17, 2011
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants