-
-
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)
Description | From | Last Updated |
---|---|---|
So something we've found in the past is that Pygments's XML rendering is very slow for very large XML files. … |
|
SL
Change Summary:
Added captions for the screenshots of XML Thumbnails
-
File Captions:
xml_thumbs_1.png: + As rendered in Ubuntu + Chrome at 400% Zoom xml_thumbs_2.png: + As rendered in Ubuntu + Chrome at 400% Zoom