Add timeout to Jupyter Diff transformation and don't render large files
@eduardobonet I wonder if in the interim we should do something like we do with syntax highlighting and give the notebook parser a fixed timeout to do its work (https://gitlab.com/gitlab-org/gitlab/blob/879628c8260b2b5813ce4d90a01a890bd0afe274/lib/gitlab/highlight.rb#L81) to avoid failing outright here. A plain diff is better than a 500 error.
@stanhu Funny thing, theses file are too large and would not be rendered either way. There's a flag we can use to avoid running this entirely, event though the rendered diff is considerably smaller and could be displayed under the current constraints. But I agree the timeout should be put in place.
Edited by Eduardo Bonet