Cache inline-diff results to avoid rediffing blocks (closes bgo#168139)
Calculation of inline diffs is one of the most expensive things we do, but most changes to the diffed text result in very few changed blocks. This patch adds a simple caching mechanism to avoid constantly rediffing unchanged blocks. Currently, blocks are evicted from the cache on a LRU basis, which isn't perfect but works reasonably well. In combination with the previous patch, this closes bgo#168139.
Showing with 38 additions and 2 deletions