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)
Fri, Oct 11, 5:27 AM
Unknown Object (File)
Wed, Oct 2, 3:16 PM
Unknown Object (File)
Sep 13 2024, 10:04 PM
Unknown Object (File)
Sep 13 2024, 10:04 PM
Unknown Object (File)
Sep 13 2024, 9:57 PM
Unknown Object (File)
Sep 13 2024, 9:55 PM
Unknown Object (File)
Sep 11 2024, 7:36 PM
Unknown Object (File)
Sep 11 2024, 7:35 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.