Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Memory overhead of blessed hashes

by Anonymous Monk
on Feb 09, 2021 at 20:27 UTC ( [id://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 (Saint) on Feb 09, 2021 at 23:54 UTC

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (1)
As of 2024-04-25 19:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found