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/layout
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
..
phabricator-action-list-view.css Lay in more styles from "diff_full_view.png" 2012-12-11 14:01:35 -08:00
phabricator-crumbs-view.css Minor Breadcrumb tweeks 2012-12-08 08:35:20 -08:00
phabricator-filetree-view.css Abstract and further merge filter menus 2012-12-07 13:32:14 -08:00
phabricator-form-view.css Simplify ".device-phone X, .device-tablet X { ... }" rules 2012-12-07 13:37:10 -08:00
phabricator-header-view.css Lay in more styles from "diff_full_view.png" 2012-12-11 14:01:35 -08:00
phabricator-object-item-list-view.css Modernize Files lists 2012-12-16 16:33:02 -08:00
phabricator-pinboard-view.css Use a "pinboard" UI to display image macros 2012-10-01 14:06:00 -07:00
phabricator-property-list-view.css Modernize file detail view 2012-12-16 16:33:24 -08:00
phabricator-side-menu-view.css Refactor the main menu in preparation for a mobile application menu 2012-12-07 13:33:03 -08:00
phabricator-source-code-view.css Provide a highlighter cache for Paste 2012-12-16 16:33:42 -08:00
phabricator-tag-view.css Build PhabricatorTagView 2012-11-24 06:47:06 -08:00
phabricator-timeline-view.css Improve overflow behavior of Timeline view 2012-12-11 14:02:51 -08:00