Loading a commit page takes a long time

Example commit: https://gitlab.com/gitlab-org/gitlab-ce/commit/452c076a34cc11cc97f4b1c3113e86ce4367e05

image

It appears:

  • 58% of the time is spent on highlighting individual lines
  • 29% of the time is spent rendering HAML

From image

commit-prof.zip