Liran Nuna <liran...@gmail.com> added the comment:

> Also I suggest you to try uvloop

Sadly, uvloop does not offer any noticeable improvement in performance for us. 
Our usage is very similar to the "benchmarks" I posted - we don't do any actual 
async I/O because asynq does not offer that. 

> I suggest you to profile it and post real profiles here

Gladly! Would you like profiles of python within itself (as in, made with 
`cProfile`) or gmon.out profiles? the latter would be a little more difficult 
to run since we run a web server which needs to accept traffic, but I do have 
plenty of `cProfile` profiles I could share with you.

> I just don't think that asyncio.gather can be the main bottleneck you have, 
> it must be something else

I think my PR and the examples I have provided set a different mindset to this 
issue - the issue in question is that the "sync" performance of async/await is 
very poor when used to execute things in "sync". The benchmarks provided are an 
example of what a request life time looks like - there's a lot of 
scatter-gather to batch database queries that happen in sync (for the time 
being) which in the benchmark being simulated as simple math operations. To 
reiterate, I do not think `asyncio.gather` is the main performance bottleneck. 
I do not know how to better identify it with my limited knowledge about cpython.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32204>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to