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

Any task, even trivial, takes a lot of time using billiard #321

Open
gianderiu opened this issue Sep 30, 2020 · 1 comment
Open

Any task, even trivial, takes a lot of time using billiard #321

gianderiu opened this issue Sep 30, 2020 · 1 comment

Comments

@gianderiu
Copy link

Any task, even trivial, takes a lot of time using billiard. The same test works fine using the multiprocessing library.
test.py

import billiard as mp

def func(a):
  return a


y= list(range(10))

pool = mp.Pool(2)
s = sum(pool.map(func, y))
pool.close()
pool.join()

print (s)

run the script

time python3 test.py 
45

real	0m31.168s
user	0m0.104s
sys	0m0.023s

if you replace billiard with multiprocessing it works fine:

time python3 test.py 
45

real	0m0.185s
user	0m0.087s
sys	0m0.007s
@gianderiu
Copy link
Author

The problem appears in release 3.6.1.0

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

1 participant