On Thu, Nov 16, 2017 at 7:56 AM, Victor Stinner <victor.stin...@gmail.com> wrote: > 2017-11-16 13:43 GMT+01:00 Antoine Pitrou <anto...@python.org>: >>> About asyncio debug mode, if it's too expensive to be used to develop >>> an application, maybe there is an issue with additional checks? Should >>> we remove some of them to be able to use asyncio debug mode in more >>> cases? >> >> Well, I'm sure some people like them, otherwise they wouldn't have been >> added to the codebase in the first place :-) For example, knowing where >> a Future was created can make debug logs much more informative. > > The most expensive part of asyncio debug mode is the code to extracts > the current stack when a coroutine or a handle is created.
Probably the most expensive part of asyncio debug mode is all coroutines wrapped with CoroWrapper. This makes every "await" and coroutine instantiation much slower (think 2-3x). > Would it make sense to modify asyncio debug mode to skip the traceback > by default, but add a second debug level which extracts the traceback? Let's keep it simple. I'm big -1 on adding different "debug levels", they are always confusing. Overall I don't see an issue with enabling asyncio debug mode when python is executed with "-X dev". If the purpose of the flag is to make Python super verbose and it will not be recommended to use it in production -- then why not. Yury _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com