Skip Menu |

This queue is for tickets about the Gitalist CPAN distribution.

Report information
The Basics
Id: 68711
Status: resolved
Priority: 0/
Queue: Gitalist

People
Owner: Nobody in particular
Requestors: DRUOSO [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.003001
Fixed in: (no value)



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.
On Wed Jun 08 15:01:25 2011, DRUOSO wrote: Show quoted text
> 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.
Thanks for the bug report. I came across this when investigating another bug and made a very similar fix as seen here: https://github.com/broquaint/Gitalist/commit/7de10b8dfb36818956b7e3488d3 81e22f9d8d959 This went into 0.003003 which was released on the CPAN a few days back. -- Cheers, Dan Brook