Reverse diffs
Assumption: You have the most recent revision available anyways in your "articles" table. Then use reverse-diffs (that convert revision k into revision k-1) instead of normal forward-diffs (that would convert revision k into revision k+1). This saves disk space.
Let's assume you have n revisions. With reverse-diffs your "revisions" table only needs to save one reverse-diff for each of the (n-1) old revisions. In contrast to that for forward-diffs you would have to store the initial revision completely (1) plus one forward-diff for each following revision (n-1) which sums up to n.
Diff format
Instead of using diffutils think about whether it might be more easy and maybe even efficient to serialize and gzip the data of all revisions. Mediawiki does this especially because this is a very efficient way to deal with edit-wars (source for this is a presentation by a Mediawiki developer, but I have lost the link, sorry).
Montag, 10. Januar 2011
Abonnieren
Kommentare zum Post (Atom)
0 Kommentare:
Kommentar veröffentlichen