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

INADA Naoki songofacandy at gmail.com
Wed Sep 6 03:42:11 EDT 2017

> How significant is application startup time to something that uses
> Jinja2? Are there short-lived programs that use it? Python startup
> time matters enormously to command-line tools like Mercurial, but far
> less to something that's designed to start up and then keep running
> (eg a web app, which is where Jinja is most used).

Since Jinja2 is very popular template engine, it is used by CLI tools
like ansible.

Additionally, faster startup time (and smaller memory footprint) is good
for even Web applications.
For example, CGI is still comfortable tool sometimes.
Another example is GAE/Python.

Anyway, I think researching import tree of popular library is good startline
about optimizing startup time.
For example, modules like ast and tokenize are imported often than I thought.

Jinja2 is one of libraries I often use. I'm checking other libraries
like requests.


INADA Naoki  <songofacandy at gmail.com>

More information about the Python-Dev mailing list