Modules, namespaces, parents, and import

Aahz aahz at pythoncraft.com
Thu Feb 5 12:33:32 EST 2004


In article <1024qhk5i05nu8c at corp.supernews.com>,
R Baumann <rynt at 9yahoo.com> wrote:
>"Aahz" <aahz at pythoncraft.com> wrote in message
>news:bvthbd$n6a$1 at panix2.panix.com...
>> In article <1022p0elv2vsd98 at corp.supernews.com>,
>> R Baumann <rynt at 9yahoo.com> wrote:
>>>
>>>Just a for instance -- Let's suppose that I had a fairly large
>>>"configuration loader" module that is used once in an application, and
>>>is never called upon again.  Why not "unload" or "release" that module
>>>from the interpreter's workspace, freeing up that chunk of memory?  If
>>>there's no need to use the module again, there's no need to keep it in
>>>memory, right?
>>
>> What is "fairly large"?  If you mean that the data it loads is large,
>> but no longer needed after initalization, it should be simple enough to
>> discard the data -- provided you really don't need it.  If you mean that
>> the code is large, I've got a difficult time imagining a module large
>> enough to make a different to a Python application on a typical modern
>> machine.
>
>Yes, I meant the code.  However, if you don't think this is a problem,
>I won't worry about it.  Do you have any idea what the limits are to
>Python in regards to large applications in the 20-30MB range.  I would
>probably suppose the answer is "there is no problem". :-)

I've never heard of an *application* that large.  100kLOC is considered
a large Python application, and even at an average fifty characters per
line, that's still only 5MB.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"The joy of coding Python should be in seeing short, concise, readable
classes that express a lot of action in a small amount of clear code -- 
not in reams of trivial code that bores the reader to death."  --GvR



More information about the Python-list mailing list