> I know it's not your code,

I don't know what they did, and I want to avoid another "told you so" situation.²

Just fighting off FUD theories that bless had a memory impact and trying to educate myself.

> Is it really necessary to hold 100k+ in memory at once?

From my understanding: they are building complicated trees (well multi-trees°) within a short time window.

> If so, if the primary attribute of each object were just a path where the serialization of the remainder of the object's guts can be found, you might save space.

That's a good idea.

Tho in my experience are Perl&OS pretty efficient in swapping unused hashes as long as they are small enough.

Of course the performance depends on the frequency you need to access those, but the same applies to your serialization idea.

Hmm ...

Actually this is a good counter argument to insight-out-objects, because class-variables holding data for all objects can't be swapped.

So it's sometimes better to keep rarely used "guts" data inside small hashes at lower nested levels.

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery

°) elements can have multiple parents (aggregation semantic)

²) see also "Chuck Norris"-ing code


In reply to Re^2: Memory overhead of blessed hashes by LanX
in thread Memory overhead of blessed hashes by LanX

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.