mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 14:00:56 +01:00
7e37eb4827
Summary: D4188 adds a preview of Paste contents to the list, but gets slow for large lists if you have Pygments installed since it has to spend ~200ms/item highlighting them. Instead, cache the highlighted output. - Adds a Paste highlighting cache. This uses RemarkupCache because it has automatic GC and we don't have a more generalized cache for the moment. - Uses the Paste cache on paste list and paste detail. - Adds a little padding to the summary. - Adds "..." if there's more content. - Adds line count and language, if available. These are hidden on Mobile. - Nothing actually uses needRawContent() but I left it there since it doesn't hurt anything and is used internally (I thought the detail view did, but it uses the file content directly, and must for security reasons). Test Plan: {F27710} - Profiled paste list, saw good performance and few service calls. - Viewed paste. - Viewed raw paste content. Reviewers: codeblock, btrahan, chad Reviewed By: btrahan CC: aran Differential Revision: https://secure.phabricator.com/D4204 |
||
---|---|---|
.. | ||
css | ||
image | ||
js | ||
swf |