HTML: Improve diff display performance
commit70bc2829829558f256e0e8eeeb51153825ddf5cc
authorPieter de Bie <pdebie@ai.rug.nl>
Thu, 9 Oct 2008 13:47:02 +0000 (9 15:47 +0200)
committerPieter de Bie <pdebie@ai.rug.nl>
Fri, 10 Oct 2008 19:59:22 +0000 (10 21:59 +0200)
treeb4606af94bee29bda06d623251a46ec92992dcff
parent5c69f31b5aac011db26c467642a629ae95c04809
HTML: Improve diff display performance

This improves the diff performance by a factor of around 10. Things done
to do this are, among others:

* user String.replace(//g) instead of String.gsub(). It's
*much* faster
* Don't use anonymous inner functions for iteration, but instead
use for loops
* Don't use String.startsWith() if we can just compare a
single character

Because we are now so much faster, we can also show bigger diffs
by default.
html/commit.js
html/diffHighlighter.js