To generate a diff about a version, we currently need to write this code:
We need to load the document at the given version to know what is the previous version number. It won't help make xwiki faster every time you need to generate a link to have such a diff.
vmassol We could have a URL that says "compare this revision with the one before" (if we don't have that already).
Then I propose to introduce a "toRev" parameter that generates the diff between "rev - 1" and "rev".