Page MenuHomePhabricator

Differential should cache syntax highlight
Closed, ResolvedPublic

Description

Syntax highlight may takes a significant amount of time to complete. Whenever one opens up the same revision, phabricator runs highlighter again and again. Caching will improve latency and spare CPU.

Event Timeline

igorgatis raised the priority of this task from to Needs Triage.
igorgatis updated the task description. (Show Details)
igorgatis added a subscriber: igorgatis.

Whenever one opens up the same revision, phabricator runs highlighter again and again.

What are you seeing which shows this?

Sorry, I think I was not clear.

First, let me mention I'm using pygments to highlight my code.

When I open a revision, files take a while to load files. The same latency is observed when I open the revision again. No matter how many times I open the same revision, it always take the same time to load.

I assumed that's because of syntax highlight (use to be faster without pygments, at least). So, I'm assuming most of the time "loading..." is spent with syntax highlighting.

Does that make sense?

FYI: the change D9171: Fix binary/utf8 issues with Differential changeset parse cache shows an alert for files with Byte Order Mark. Visual Studio adds BOM for all files. These two things together make code review impossible for C# projects. Files with BOM no longer show up in code reviews.

Screenshot_from_2014-05-18_01:38:33.png (228×917 px, 23 KB)

I'm surprised by that -- did you run the associated storage patch with bin/storage upgrade?

MySQL continues to amaze.

I think rP15c408be fixes this.

(@spicyj, you were correct about BLOB vs TEXT.)

Yep. Seems fixed. Thanks a bunch!

epriestley claimed this task.

Cool, thanks.