[issue31970] asyncio debug mode is very slow

2017-11-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: In any case, I think this is better discussed on async-sig (where I already started a discussion thread some weeks ago -- see """APIs for high-bandwidth large I/O?"""). -- ___ Python tracker

[issue31970] asyncio debug mode is very slow

2017-11-08 Thread Yury Selivanov
Yury Selivanov added the comment: > IMHO performance is a good motivation to enhance the asyncio API ;-) The > tricky part is to keep the backward compatibility. Let's stop the discussion in this ticket :) -- ___ Python

[issue31970] asyncio debug mode is very slow

2017-11-08 Thread STINNER Victor
STINNER Victor added the comment: > The problem is the Protocol API imposes copies by default (...) IMHO performance is a good motivation to enhance the asyncio API ;-) The tricky part is to keep the backward compatibility. --

[issue31970] asyncio debug mode is very slow

2017-11-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Sorry. It looks like I completely misunderstood. =) -- ___ Python tracker ___

[issue31970] asyncio debug mode is very slow

2017-11-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 08/11/2017 à 14:40, Giampaolo Rodola' a écrit : > Exposing sendfile() should be straightforward. sendfile() is not useful for data that's read from (or written to) memory. > As for a readinto()-like functionality: the only thing I'm aware

[issue31970] asyncio debug mode is very slow

2017-11-08 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: >> I've a few ideas how to add 0-copy support to protocols. > I'd be interesting to hear about them. The main challenge IMHO is to find a > way to allow a readinto()-like functionality. Exposing sendfile() should be straightforward. I

[issue31970] asyncio debug mode is very slow

2017-11-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I've a few ideas how to add 0-copy support to protocols. I'd be interesting to hear about them. The main challenge IMHO is to find a way to allow a readinto()-like functionality. -- ___ Python

[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Yury Selivanov
Yury Selivanov added the comment: Thank you for helping with asyncio! I'll try to get to that transport performance issues you found sometime this week. I've a few ideas how to add 0-copy support to protocols. -- ___ Python

[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset d8d218ffda6b7569625ff9edadbbc9a2b1055e32 by Antoine Pitrou in branch '3.6': [3.6] bpo-31970: Reduce performance overhead of asyncio debug mode. (GH-4314) (#4322)

[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you for the quick reviews! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Antoine Pitrou
Change by Antoine Pitrou : -- pull_requests: +4280 ___ Python tracker ___ ___

[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 921e9432a1461bbf312c9c6dcc2b916be6c05fa0 by Antoine Pitrou in branch 'master': bpo-31970: Reduce performance overhead of asyncio debug mode. (#4314)

[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Antoine Pitrou
Change by Antoine Pitrou : -- nosy: +asvetlov ___ Python tracker ___ ___ Python-bugs-list

[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: If this is accepted on the principle, it would be great to also patch 3.6. -- ___ Python tracker ___

[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Antoine Pitrou
Change by Antoine Pitrou : -- keywords: +patch pull_requests: +4273 stage: -> patch review ___ Python tracker ___

[issue31970] asyncio debug mode is very slow

2017-11-07 Thread Antoine Pitrou
New submission from Antoine Pitrou : Each time a new future, handle or task is created, asyncio with debug mode enabled will parse the whole call stack and create a StackSummary object for it. Imagine a recursive coroutine: with N nested calls, you get O(N**2) performance.