HomePhabricator

Improve Diffusion behavior for directories with impressive numbers of files

Tags
None
Referenced Files
F1055653: Screen Shot 2016-01-06 at 4.07.35 AM.png
Jan 6 2016, 10:20 PM
F1055656: Screen Shot 2016-01-06 at 4.07.48 AM.png
Jan 6 2016, 10:20 PM
F1055655: Screen Shot 2016-01-06 at 4.07.05 AM.png
Jan 6 2016, 10:20 PM
Subscribers
None

Description

Improve Diffusion behavior for directories with impressive numbers of files

Summary:
Fixes T4366. Two years ago, Facebook put 16,000 files in a directory. Today, the page has nearly loaded.

Paginate large directories.

Test Plan:

  • Viewed home and browse views in Git, Mercurial and Subversion.

I put an artificially small page size (5) on home:

Screen Shot 2016-01-06 at 4.07.35 AM.png (1×1 px, 265 KB)

I pushed 16,000 files to a directory and paged through them. Here's the last page, which rendered in about 200ms:

Screen Shot 2016-01-06 at 4.07.05 AM.png (1×1 px, 437 KB)

Our behavior is a bit better than GitHub here, which shows only the first 1,000 files, disables pagination, and can't retrieve history for the files:

Screen Shot 2016-01-06 at 4.07.48 AM.png (1×1 px, 160 KB)

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4366

Differential Revision: https://secure.phabricator.com/D14956