[issue22448] call_at/call_later with Timer cancellation can result in (practically) unbounded memory usage.

Yury Selivanov report at bugs.python.org
Tue Sep 30 16:56:51 CEST 2014


Yury Selivanov added the comment:

Victor,

I've done some additional testing. Here's a test that Joshua wrote for the code review: https://gist.github.com/1st1/b38ac6785cb01a679722

It appears that single loop approach works a bit faster for smaller collections of tasks. On a list of 10000 tasks it's on average faster 2-3%, on a list of 1000000 tasks it's slower for 2-3%.

I'm not sure what's the average number of tasks for an "average" asyncio application, but something tells me it's not going to be in range of millions. I think you can fix the code to have a single loop.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22448>
_______________________________________


More information about the Python-bugs-list mailing list