reviewboard/attachments/mimetypes.py (Diff revision 1)
So something we've found in the past is that Pygments's XML rendering is very slow for very large XML files. So I'd cap it. If the file is over a certain size (let's say 10KB, which should be defined as a constant on the class), don't highlight it.
Syntax-Highlighted Thumbnail Rendering for XML File Attachments
Review Request #3567 — Created Nov. 26, 2012 and submitted
Added thumbnail rendering support for XML mimetypes using pygments
Manual Testing on Localhost: - Uploaded various XML files - All render correctly with syntax-highlighting (See attached screenshots: 2012-11-27)
So something we've found in the past is that Pygments's XML rendering is very slow for very large XML files. …
Added captions for the screenshots of XML Thumbnails
xml_thumbs_1.png: + As rendered in Ubuntu + Chrome at 400% Zoom xml_thumbs_2.png: + As rendered in Ubuntu + Chrome at 400% Zoom
Curious, why the zoom? I'd prefer getting an accurate idea of what these look like.
I don't know if it's possible without some work, but it would be nice if this was part of the XML Review UI extension.