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
Unknown Object (File)
Mon, Jul 22, 11:29 PM
Unknown Object (File)
Sun, Jul 21, 3:50 PM
Unknown Object (File)
Fri, Jul 19, 8:09 AM
Unknown Object (File)
Fri, Jul 19, 2:44 AM
Unknown Object (File)
Mon, Jul 15, 10:17 AM
Unknown Object (File)
Wed, Jul 10, 4:42 AM
Unknown Object (File)
Tue, Jul 2, 7:53 AM
Unknown Object (File)
Sun, Jun 30, 11:10 AM
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.