Overhead of individual python apps

Fredrik Lundh fredrik at pythonware.com
Wed Sep 28 06:18:42 EDT 2005


Paul Rubin wrote:

> An awful lot of Python targeted users are not in that situation, so if
> Python's usability suffers for them when it doesn't have to, then
> something is wrong with Python.

(and so we go from the OP:s "I'm setting up a system" to the usual c.l.python "but
I can come up with another example" crap...)

But back to the "memory measurements" and your claim that "something is wrong
with Python [if the task manager shows large numbers]"...

Have you looked at a task manager on a lightly loaded W2K or WXP system lately?
On this PC, I currently have a couple of browser windows open, a newsreader, and
a few other programs.  The only real app I have that uses less than 4 megabytes
*according to the task manager* is a 2.5 megabyte putty terminal window; most
apps are in the 15-50 megabyte range.

Even a trivial operation, like opening another Firefox tab, can make that process
grow by more than 4 megabytes, and if you browse around a little, you can easily
end up with 30-50 megabytes in "mem usage" -- until you minimize the browser,
and find that Firefox only uses 1.5 megabytes. Maximize it again, and it uses 12
megabytes.

Play the same games with a Python interpreter, and you'll find that the task manager
may report anything from just over 50 kilobytes to just under 5 megabytes.

Here's a random google link that discusses the task manager figures in a little more
detail:

    http://www.itwriting.com/dotnetmem.php

    "Newcomer to .NET says: I've just been looking at Task Manager. Why
    does my simple VB.NET Windows application use 12MB RAM?"

    "Don't worry. The app doesn't really use that much RAM."

(for python, the "private" memory use is usually ~1.5 megabytes for a "empty" 2.4
process, and some of that will only occupy space in the paging file...  for firefox with
a simple page loaded into a single tab, the private space is ~10 megabytes)

</F> 






More information about the Python-list mailing list