http://bugs.winehq.org/show_bug.cgi?id=20999
--- Comment #1 from Vincent Povirk madewokherd@gmail.com 2009-12-12 12:31:17 --- Thanks for taking the time to report and bisect this bug. I was afraid of something like this, and it's good that you have a testcase.
By moving implementation details out of the storage IStream implementation, I lost the persistent BlockChainStream/SmallBlockChainStream objects that had been attached to them. These objects had been saving some useful information that we now have to read again from the file each time there's a read or write on the stream.
The way we kept these details in IStream was unsafe because we could have two IStream objects for a single stream, each one maintaining its own cache (which can become invalid if the other modifies the stream). So I think StorageImpl needs to track this information somehow. StorageImpl can do it safely because it sees all changes.
I should have some patches within the week, and I'd appreciate if you could test them. It's hard to tell which optimizations will be helpful and which ones just add useless complexity.