[Python-Dev] Updated PEP 454 (tracemalloc): no more metrics!

Kristján Valur Jónsson kristjan at ccpgames.com
Sat Oct 26 12:57:00 CEST 2013


In that case, how about adding a client/server feature?
If you standardize the format, a minimal tracing client could write a log, or send it to a socket, in a way that can be turned into a snapshot by a corresponsing utility reading from a file or listenting to a socket.
Just a though.  Could be a future addition…

From: Python-Dev [mailto:python-dev-bounces+kristjan=ccpgames.com at python.org] On Behalf Of Victor Stinner
Sent: 24. október 2013 16:45
To: python-dev
Subject: Re: [Python-Dev] Updated PEP 454 (tracemalloc): no more metrics!


> When I was looking for memory leaks in the regex module I simply wrote all of the allocations, reallocations and deallocations to a log file and then parsed it afterwards using a Python script. Simple, but effective.

He he, it's funny because you described exactly my first implementation of tracemalloc! I wrote output using fprintf() into a text file. The parser was written in Python but too slow to be used it in practice. When running on the slow set top box, it took minutes (5 maybe 10) to analyze the file. Transfering the file to a PC took also minutes: the file was very large (maybe 1 GB, I don't remember) and SimpleHTTPServer too slow for the transfer.

Victor
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20131026/7ce82dde/attachment.html>


More information about the Python-Dev mailing list