Looking at the Obama diffs on Wikipedia article history, there are probably thousands of diffs. Clicking on a specific older diff took about 3-5 seconds to load, as opposed to the more snappy Wikipedia pages. Then you can see the specific diff between two versions, the old old version, and the current version.
The question is, how do they efficiently store these diffs, if they are not using git (I would assume)?
I am searching for how to implement text diff tracking in a small toy app I am working with. There will be potentially a million pages, each with records which might have anywhere from 0 to 1000 edits let's say. The edits will be much smaller than Wikipedia articles, sometimes on the order of the character diff of one word, other times a few sentences.
The recommended approach I have seen so far is to store the current full text form of the record text, and then store "reverse diffs" to get to the previous one, and the previous one from that, etc.. Then to hydrate an old article, you would fetch all the old diffs (like 3000 diffs in that Wikipedia diff probably), and rewind from the current text to get the old version. This seems like it would be horribly inefficient though (and I'm not sure how to compute a "reverse" diff, such as with jsdiff). Is it the best way to do it? I guess you wouldn't want to store a copy of the full text on every change, or does Wikipedia do that? That would explode in content size I would imagine, especially on Wikipedia.
Basically wondering how to implement Wikipedia-like diffing by somehow storing the content in a SQL database. My case won't have as large of content as Wikipedia, but it would be good to know how to solve it properly for this "worse case".