gerrit/gerrit-common
Shawn O. Pearce 47cfa6d8cf Move syntax highlighting back to client
Mozilla Rhino is just slow running the JavaScript for prettify.
Its quicker inside of most modern browsers, especially ones that
have a good JIT like Goole Chrome or Safari 4.

Move the rendering back onto the client side.  To do this correctly
we have to ship the entire file to the client.  So what we do is,
we send the entire "A" file, the old image, and only the new lines
from the "B" file, the new image.  When formatting locally on the
client we recreate the full "B" file in order to syntax highlight it.

If a file is considered large, over 9000 lines, we still only send
part of the file and we disable the syntax highlighting.  This way
the client doesn't get bogged down in rendering lots of text when
the file is something really massive.

Bug: issue 439
Change-Id: Ib70c6526af09f84ebbfe467cfbb27c75ca7c9ad7
Signed-off-by: Shawn O. Pearce <sop@google.com>
2010-02-16 12:07:09 -08:00
..
2009-12-30 17:19:49 -08:00