1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 14:00:56 +01:00
phorge-phorge/webroot/rsrc/css
epriestley 7e37eb4827 Provide a highlighter cache for Paste
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
2012-12-16 16:33:42 -08:00
..
aphront Align table cell content in Diffusion. 2012-12-16 16:02:18 -08:00
application Tweak padding on revision history table. 2012-12-15 07:59:18 -08:00
core Lay in more styles from "diff_full_view.png" 2012-12-11 14:01:35 -08:00
layout Provide a highlighter cache for Paste 2012-12-16 16:33:42 -08:00
sprite-apps-large.css Use application icons for "Eye" menu and Crumbs 2012-12-07 13:37:28 -08:00
sprite-apps-xlarge.css Use application icons for "Eye" menu and Crumbs 2012-12-07 13:37:28 -08:00
sprite-apps.css Use application icons for "Eye" menu and Crumbs 2012-12-07 13:37:28 -08:00
sprite-gradient.css Use application icons for "Eye" menu and Crumbs 2012-12-07 13:37:28 -08:00
sprite-icon.css Modernize Files lists 2012-12-16 16:33:02 -08:00
sprite-menu.css Clean up some more sprite stuff 2012-12-07 14:29:09 -08:00