ole32: Store the location of all blocks in a big block chain in memory.
commit42550953a650e1ef166339fb4e2fdc06741ad5b8
authorVincent Povirk <vincent@codeweavers.com>
Tue, 4 May 2010 20:15:41 +0000 (4 15:15 -0500)
committerAlexandre Julliard <julliard@winehq.org>
Wed, 5 May 2010 08:41:57 +0000 (5 10:41 +0200)
treed76ad0f3feffd706f0909794953a766453f547b4
parent93cc582a8d040c3442513b26906d4093ff13ad84
ole32: Store the location of all blocks in a big block chain in memory.

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).
dlls/ole32/storage32.c
dlls/ole32/storage32.h