On Tue, 30 Nov 2004 16:46:43 -0500, Brad Tilley <[EMAIL PROTECTED]> wrote:
> I discovered that when I wrap my code up in a function def and call it
> that it uses around 4.6 MB of RAM all the time... even while sleeping.
> However, when I don't put it in a function def it uses around 2.6MB of
> dat
Brad Tilley wrote:
When memory usage is a concern, is it better to do:
from X import Y
or
import X
Also, is there a way to load and unload modules as they are needed. I
have some scripts that sleep for extended periods during a while loop
and I need to be as memory friendly as possible. I can pos
Brad Tilley <[EMAIL PROTECTED]> writes:
> When memory usage is a concern, is it better to do:
>
> from X import Y
>
> or
>
> import X
Depending on "Y", the latter can technically use less memory, but it's
likely to be fairly small and depends on how many symbols from that
module you want to ha
Jp Calderone wrote:
On Tue, 30 Nov 2004 10:02:27 -0500, Brad Tilley <[EMAIL PROTECTED]> wrote:
When memory usage is a concern, is it better to do:
from X import Y
or
import X
There is no difference. If you are concerned about memory usage, you
probably need to take a look at the data structure
On Tue, 30 Nov 2004 10:02:27 -0500, Brad Tilley <[EMAIL PROTECTED]> wrote:
>When memory usage is a concern, is it better to do:
>
> from X import Y
>
> or
>
> import X
There is no difference. If you are concerned about memory usage, you
probably need to take a look at the data structures ho
Brad Tilley wrote:
Also, is there a way to load and unload modules as they are needed. I
have some scripts that sleep for extended periods during a while loop
and I need to be as memory friendly as possible. I can post a detailed
script that currently uses ~ 10MB of memory if anyone is interest