Page MenuHomePhabricator

Improve Diffusion browse performance for large files
ClosedPublic

Authored by epriestley on Jan 6 2016, 2:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 28, 9:33 AM
Unknown Object (File)
Thu, Apr 11, 5:41 PM
Unknown Object (File)
Tue, Apr 9, 9:15 AM
Unknown Object (File)
Sun, Apr 7, 8:14 PM
Unknown Object (File)
Fri, Apr 5, 12:46 PM
Unknown Object (File)
Thu, Apr 4, 7:55 AM
Unknown Object (File)
Wed, Apr 3, 5:06 PM
Unknown Object (File)
Wed, Apr 3, 11:48 AM
Subscribers
None

Details

Summary

When looking at a large file in Diffusion:

  • disable highlighting if it's huge and show a note about why;
  • pick up a few other optimizations.
Test Plan

Locally, this improves the main render of __phutil_library_map__.php from 3,200ms to 600ms for me, at the cost of syntax highlighting (we can eventually add view options and let users re-enable it).

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

epriestley retitled this revision from to Improve Diffusion browse performance for large files.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
epriestley added a reviewer: chad.

I think our behavior here is now better than GitHub, which is roughly as fast but truncates the file in the middle:

Screen Shot 2016-01-06 at 6.45.16 AM.png (1×2 px, 415 KB)

I'd rather lose syntax highlighting than half the file?

(I'm going to collapse the blame, editor, highlighting and lint options into a "View Options" dropdown menu eventually, but probably not in the immediate future.)

chad edited edge metadata.
This revision is now accepted and ready to land.Jan 6 2016, 3:02 PM
This revision was automatically updated to reflect the committed changes.