[2/2] ole32: Store the location of all blocks in a big block chain in memory.

Vincent Povirk vincent at codeweavers.com
Tue May 4 15:15:41 CDT 2010


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).

I have a benchmark that's about 30 times faster with this change, not that benchmarks mean anything.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20100504/9fe95437/attachment.htm>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0002-ole32-Store-the-location-of-all-blocks-in-a-big-block-.txt
URL: <http://www.winehq.org/pipermail/wine-patches/attachments/20100504/9fe95437/attachment.txt>


More information about the wine-patches mailing list