A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2017-September/149624.html below:

[Python-Dev] To reduce Python "application" startup time

[Python-Dev] To reduce Python "application" startup time [Python-Dev] To reduce Python "application" startup timeSerhiy Storchaka storchaka at gmail.com
Sat Sep 23 18:39:26 EDT 2017
05.09.17 16:02, INADA Naoki пише:
> While I can't attend to sprint, I saw etherpad and I found
> Neil Schemenauer and Eric Snow will work on startup time.
> 
> I want to share my current knowledge about startup time.
> 
> For bare (e.g. `python -c pass`) startup time,  I'm waiting C
> implementation of ABC.
> 
> But application startup time is more important.  And we can improve
> them with optimize importing common stdlib.
> 
> Current `python -v` is not useful to optimize import.
> So I use this patch to profile import time.
> https://gist.github.com/methane/e688bb31a23bcc437defcea4b815b1eb
> 
> With this profile, I tried optimize `python -c 'import asyncio'`, logging
> and http.client.
> 
> https://gist.github.com/methane/1ab97181e74a33592314c7619bf34233#file-0-optimize-import-patch
> 
> With this small patch:
> 
> logging: 14.9ms -> 12.9ms
> asyncio: 62.1ms -> 58.2ms
> http.client: 43.8ms -> 36.1ms

See also https://bugs.python.org/issue30152 which optimizes the import 
time of argparse using similar technique. I think these patches overlap.

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4