Message310272
Since PEP 562 is implemented, we can use lazy imports easily.
Asyncio uses concurrent.futures.Future and concurrent.futures.ThreadPoolExecutor,
but not concurrent.futures.ProcessPoolExecutor by default.
Since importing concurrent.futures.process is slow, I want to import it lazily.
And it make sense to import concurrent.futures.thread too, because it's very
easy when we start to use __getattr__ once.
Here is quick benchmark:
$ ./python -m perf command ./python -c 'import asyncio' # patched
.....................
command: Mean +- std dev: 60.5 ms +- 0.1 ms
$ git stash
$ ./python -m perf command ./python -c 'import asyncio' # original
.....................
command: Mean +- std dev: 74.3 ms +- 0.2 ms |
|
Date |
User |
Action |
Args |
2018-01-19 10:54:10 | methane | set | recipients:
+ methane, yselivanov, levkivskyi |
2018-01-19 10:54:10 | methane | set | messageid: <1516359250.47.0.467229070634.issue32596@psf.upfronthosting.co.za> |
2018-01-19 10:54:10 | methane | link | issue32596 messages |
2018-01-19 10:54:09 | methane | create | |
|