Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
Yes (tilly), I see. I read at Sleepycat that B-tree wins over hash, and then (if/when prescaled B-tree size exceeded) the hash wins again, but that sounds like just doing it wrong. I bow to your experience.

My gut instinct was to leave all seeking and logic to a trigger in the DB, but say we just use Perl - how to get more detailed profiling info to find the culprit? We don't have info about these objects but how about the general case..

I thought about the cache digest bitmap in Sourceforge squid docs, which uses 1 bit is used per object. This led me to imagine using a sequential memory map for 2 million objects, each of which contains address of parent and some other data. But realized locality in B-tree must beat this..

Any ideas as to performance if you

1) maintained memory map with Inline::C function which includes address of parent, an access counter, and a couple extra bytes. say 16MB for map plus an 8MB pool of free addresses. (or is this moot due to locality win in B-tree)
2) skip the memory map, but also
a) maintain a medium size B-tree of popular object MD5s, which are found because a counter in each object is incremented on seek. Added to populars tree when exceeding a pretuned threshold., hopefully this is searched very frequently instead of the big tree.
b) maintain a small hash to cache last X number of objects and cut churn.

In reply to Re: Performance quandary by mattr
in thread Performance quandary by SwellJoe

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, 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, 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.
  • Log In?

    What's my password?
    Create A New User
    marto quacks
    [1nickt]: LanX You flatter yourself. I downvote only posts that I believe do not support and promote Perl. These would include threads berating P5P volunteers and others.

    How do I use this? | Other CB clients
    Other Users?
    Others about the Monastery: (7)
    As of 2018-04-26 10:35 GMT
    Find Nodes?
      Voting Booth?