1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00
No description
Find a file
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
bin Modernize the drydock script 2012-11-01 15:30:14 -07:00
conf Allow phabricator to manage repositories 2012-12-12 14:43:09 -08:00
externals Support SMTP as the mailer. 2012-12-09 02:37:02 -08:00
resources Modernize Files lists 2012-12-16 16:33:02 -08:00
scripts Allow leases to be explicitly released via web or CLI 2012-12-14 15:42:58 -08:00
src Provide a highlighter cache for Paste 2012-12-16 16:33:42 -08:00
support Delete license headers from files 2012-11-05 11:16:51 -08:00
webroot Provide a highlighter cache for Paste 2012-12-16 16:33:42 -08:00
.arcconfig Delete license headers from files 2012-11-05 11:16:51 -08:00
.divinerconfig Centralize rendering of application mail bodies 2012-07-16 19:01:43 -07:00
.editorconfig Specify config for text editors 2012-11-03 22:34:44 -07:00
.gitignore Remove support for custom logos 2012-07-30 11:09:28 -07:00
.gitmodules Just change the location. 2011-05-28 15:14:54 -07:00
LICENSE Delete license headers from files 2012-11-05 11:16:51 -08:00
NOTICE Delete license headers from files 2012-11-05 11:16:51 -08:00
README Delete license headers from files 2012-11-05 11:16:51 -08:00

Phabricator is a open source collection of web applications which make it easier
to write, review, and share source code. Phabricator was developed at Facebook.

This is an early release. It's pretty high-quality and usable, but under
active development so things may change quickly.

You can learn more about the project and find links to documentation and
resources at: http://phabricator.org/

LICENSE

Phabricator is released under the Apache 2.0 license except as otherwise noted.