• Vincent Povirk's avatar
    ole32: Store the location of all blocks in a big block chain in memory. · 42550953
    Vincent Povirk authored
    A big block chain is a linked list, and we pretty much need random
    access to them. This should theoretically make accessing a random
    point in the chain O(log2 n) instead of O(n) (with disk access scaling
    based on the size of the read/write, not its location). It
    theoretically takes O(n) memory based on the size, but it can do
    better if the chain isn't very fragmented (which I believe will
    generally be the case for long chains). It also involves fetching all
    the big block locations when we open the chain, but we already do that
    anyway (and it should be faster to read it all in one go than
    piecemeal).
    42550953
storage32.h 18.5 KB