Skip to content
This repository has been archived by the owner on Nov 23, 2020. It is now read-only.

Greenlet Pool Enhancement #297

Open
lsbardel opened this issue Nov 25, 2017 · 0 comments
Open

Greenlet Pool Enhancement #297

lsbardel opened this issue Nov 25, 2017 · 0 comments

Comments

@lsbardel
Copy link
Member

lsbardel commented Nov 25, 2017

  • pulsar version: 2.0.1

Description

The greenlet pool is used for consuming implicit asynchronous function in a pool of greenlets.
The performance of consuming in the pool is worse than writing explicit asynchronous code.
The reason for the worse performance is the creation of tasks to run in the greenlet pool.

To improve things we should have a task always running which consume tasks from a queue.

Steps to reproduce

python setup.py bench -a green --sequential --io uv

with results

TestGreenIo.test_green_io: repeated 10(x2000) times, average 0.29259 secs, stdev 2.81 %
TestGreenIo.test_green_pool: repeated 10(x2000) times, average 0.38892 secs, stdev 2.64 %
TestGreenIo.test_yield_io: repeated 10(x2000) times, average 0.27353 secs, stdev 1.9 %
Ran 3 tests in 9.699s
@lsbardel lsbardel changed the title Greenlet Pool Enahncement Greenlet Pool Enhancement Nov 25, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant