[Python-Dev] Investigating Python memory footprint of one real Web application

Ivan Levkivskyi levkivskyi at gmail.com
Fri Jan 20 06:52:37 EST 2017


On 20 January 2017 at 11:49, INADA Naoki <songofacandy at gmail.com> wrote:

> * typing may increase memory footprint, through functions
> __attributes__ and abc.
>    * Can we add option to remove or lazy evaluate __attributes__ ?
>

This idea already appeared few times. I proposed to introduce a flag (e.g.
-OOO) to ignore function and variable annotations in compile.c
It was decide to postpone this, but maybe we can get back to this idea.

In 3.6, typing is already (quite heavily) optimized for both speed and
space.
I remember doing an experiment comparing a memory footprint with and
without annotations, the difference was few percent.
Do you have such comparison (with and without annotations) for your app?
It would be nice to have a realistic number to estimate what would the
additional optimization flag save.

--
Ivan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20170120/56b18dfd/attachment.html>


More information about the Python-Dev mailing list