Page MenuHomePhabricator

Prioritize loading of files clicked in ToC
Needs ReviewPublic

Authored by vrana on Nov 23 2013, 7:44 PM.
Tags
None
Referenced Files
F13138832: D7641.diff
Fri, May 3, 2:21 AM
Unknown Object (File)
Sun, Apr 28, 4:10 AM
Unknown Object (File)
Sat, Apr 27, 4:48 PM
Unknown Object (File)
Wed, Apr 17, 3:00 PM
Unknown Object (File)
Fri, Apr 12, 11:14 PM
Unknown Object (File)
Thu, Apr 11, 7:28 AM
Unknown Object (File)
Mar 24 2024, 2:31 AM
Unknown Object (File)
Mar 4 2024, 11:31 PM
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

Also fix double loading of files clicked in ToC before they were loaded.

In future, we can detect which file is looked at by user and load that with priority too.

Array is not the best data structure for priority queue but it's not a big deal as we'd usually reorder it just once.

Test Plan

Added sleep(5) to DifferentialChangesetViewController, decreased load_limit to 1, clicked on third file in ToC, saw it loaded before the second.

Diff Detail

Branch
master
Lint
Lint Passed
Unit
No Test Coverage

Event Timeline

vrana updated this revision to Unknown Object (????).Nov 23 2013, 11:32 PM

Generalize

epriestley removed a reviewer: epriestley.

This is obsoleted by D8979, which adds a flexible global priority queue for AJAX requests and covers this use case specifically.