Similar to [#8332] (limiting max size for syntax highlighting) set some overall max sizes. Downloading with ?format=raw
can be a higher limit, I've found reading files from a repo is generally quite fast, but rendering them into an html template (even with syntax highlighting omitted) can be slow for very large files.
done on db/8381