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/2013-October/129240.html below:

[Python-Dev] Reduce memory footprint of Python

[Python-Dev] Reduce memory footprint of PythonAntoine Pitrou solipsis at pitrou.net
Tue Oct 8 11:23:59 CEST 2013
For the record, if you want to reduce memory footprint of Python on a
x86-64 bit, you can use the "x32" ABI for which Debian/Ubuntu provide
some support.

(install the required base packages and use CFLAGS=-mx32 LDFLAGS=-mx32)

Regards

Antoine.


Le Sun, 6 Oct 2013 17:32:37 +0200,
Victor Stinner <victor.stinner at gmail.com> a écrit :
> Hi,
> 
> Slowly, I'm trying to see if it would be possible to reduce the memory
> footprint of Python using the tracemalloc module.
> 
> First, I noticed that linecache can allocate more than 2 MB. What do
> you think of adding a registry of "clear cache" functions? For
> exemple, re.purge() and linecache.clearcache(). gc.collect() clears
> free lists. I don't know if gc.collect() should be related to this new
> registy (clear all caches) or not.
> 
> The dictionary of interned Unicode strings can be large: up to 1.5 MB
> (with +30,000 strings). Just the dictionary, excluding size of
> strings. Is the size normal or not? Using tracemalloc, this dictionary
> is usually to largest memory block.
> 
> unittest doesn't look to release memory (the TestCase class) after the
> execution of a test.
> 
> test_import.test_module_with_large_stack() creates a large Python
> module and import it, but it does not unload it.
> 
> Should I open a separated issue for each idea to track them in the bug
> tracker, or a global issue?
> 
> Victor



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