in reply to Memory overhead of blessed hashes
It's my understanding that bless just populates a pointer-value in the data structure to allow -> semantics to be used against it.
Although you don't say how large each object/hash is, "100k of them" does not sound like a problem unless you have a leak. Look for any point in the code where one object acquires a reference to another. If you need that, "weaken" those references. (Scalar::Util)
Test::Memory::Cycle can also help you look for these problems – it's generally cheap enough that you can salt your code with calls to it and just leave them there.
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Memory overhead of blessed hashes
by LanX (Saint) on Feb 09, 2021 at 23:54 UTC |