On Wed, 30 Sep 2015, Travis Scrimshaw wrote:

However, unless you're storing a strong reference to the poset, you don't run into memory problems as the UniqueRepresentation is a weak cache. So if you are running out of memory, there is a leak somewhere.

Well... About always when I want to compute something longer than for 4..24 hours, I will be out of memory.

This is an artificial example to show what I mean. Let this run for several minutes:

P7 = Posets(7).list()

i = 0
while True:
    for P in P7:
          if i%1000 == 0:
              print i, get_memory_usage()
          M = P.width()
          i += 1

Compare with P.height() that does not eat memory.

--
Jori Mäntysalo

Reply via email to