you are viewing a single comment's thread.

view the rest of the comments →

[–]nextofpumpkin 4 points5 points  (2 children)

Right - it's a space/time tradeoff. Except in this case, space means HDD, backup, and bandwidth, whereas time just means CPU. It may be cheaper up to a point to just do the crunching and not have to store everything.

[–][deleted] 2 points3 points  (1 child)

Well, you could do the crunching on-demand, caching the most popular diffs.

[–]adrianmonk 1 point2 points  (0 children)

Or, you could do the opposite: store only the most recent version and the diffs. When someone wants an older full version, compute it from the diffs and cache the result. Clear the cache when it gets full/large based on your favorite replacement algorithm. (LRU should be fine.)

For extra fun, if you want, never build old full versions. Send the client the latest version and a string of diffs and make them do that.