Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Memory overhead of blessed hashes

by Anonymous Monk
on Feb 09, 2021 at 20:27 UTC ( #11128147=note: print w/replies, xml ) Need Help??

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 (Cardinal) on Feb 09, 2021 at 23:54 UTC

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11128147]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (6)
As of 2021-05-07 11:26 GMT
Find Nodes?
    Voting Booth?
    Perl 7 will be out ...

    Results (91 votes). Check out past polls.