Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #67962

Re: script uses up all memory

From Marko Rauhamaa <marko@pacujo.net>
Newsgroups comp.lang.python
Subject Re: script uses up all memory
Date 2014-03-07 01:12 +0200
Organization A noiseless patient Spider
Message-ID <87d2hyrkf4.fsf@elektro.pacujo.net> (permalink)
References (2 earlier) <CAPTjJmr=1CW3BP23x2RTmnfxWppUNz_m_jHp=6aBTF0qj3YkVw@mail.gmail.com> <CACwCsY4LCg5Mw-fx_Og93ErJ_N14Vqw7TO2TrEnp3wAdY0POkg@mail.gmail.com> <mailman.7879.1394144925.18130.python-list@python.org> <87ha7bq7ls.fsf@elektro.pacujo.net> <mailman.7880.1394145824.18130.python-list@python.org>

Show all headers | View raw


Chris Angelico <rosuav@gmail.com>:

> I think this thread is proof that they are to be avoided. The GC
> wasn't doing its job unless explicitly called on. The true solution is
> to break the refloop; the quick fix is to call gc.collect(). I stand
> by the recommendation to put an explanatory comment against the
> collect call.

What I'm saying is that under most circumstances you shouldn't care if
the memory consumption goes up and down. The true solution is to not do
anything about temporary memory consumption. Also, you shouldn't worry
about breaking circular references. That is also often almost impossible
to accomplish as so much modern code builds on closures, which generate
all kinds of circular references under the hood—for your benefit, or
course.


Marko

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Re: script uses up all memory Chris Angelico <rosuav@gmail.com> - 2014-03-07 09:28 +1100
  Re: script uses up all memory Marko Rauhamaa <marko@pacujo.net> - 2014-03-07 00:34 +0200
    Re: script uses up all memory Chris Angelico <rosuav@gmail.com> - 2014-03-07 09:43 +1100
      Re: script uses up all memory Marko Rauhamaa <marko@pacujo.net> - 2014-03-07 01:12 +0200
        Re: script uses up all memory Chris Angelico <rosuav@gmail.com> - 2014-03-07 10:31 +1100
          Re: script uses up all memory Marko Rauhamaa <marko@pacujo.net> - 2014-03-07 01:53 +0200
            Re: script uses up all memory Chris Angelico <rosuav@gmail.com> - 2014-03-07 11:11 +1100
              Re: script uses up all memory Marko Rauhamaa <marko@pacujo.net> - 2014-03-07 02:31 +0200

csiph-web