Subject: | Syntax highlight on big diff outputs hangs forever |
When seeing the diff for a very large commit (a merge commit of two
long-stading branches), the output can be quite large.
Apparently, there's a exponential performance degrade with large
contents in the syntax highlight of diff files.
I added
# do not highlight files bigger then 10k
return encode_entities($blob) if length($blob) > 10_000;
to Gitalist::View::SyntaxHighlight::render and the diff was shown in
reasonable time.