• Bo Liu's avatar
    android: Low rank group · da029fd5
    Bo Liu authored
    Implement code using updateServiceGroup. Specifically create a group for
    service connections that have low rank. Currently the cutoff is at
    "invisible main frame" and below.
    
    Now implementation uses own sort implementation by taking advantage that
    updates happen to a single connection at a time only. NB the simplified
    sort is no longer stable, and specifically pulls up connection's rank
    whenever it's updated.
    
    Algorithm for assigning importance in group is to pick a value between
    importance of connection to the left and to the right (if any), and
    reshuffle the entire list of there is not enough room left. There is
    a bias of assigning closer to the right; this is an optimization to
    reduce shuffle since by far the most common operation is moving a
    connection to be the most important (ie with low importance value)
    in the group.
    
    Add a feature to enable this so we can experiment when there are
    enough users.
    
    Bug: 946216
    Change-Id: I2ea4437b9b27eb205b7c2e51344f2af387938232
    Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1597071Reviewed-by: default avatarssid <ssid@chromium.org>
    Reviewed-by: default avatarTommy Nyquist <nyquist@chromium.org>
    Commit-Queue: Bo <boliu@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#659436}
    da029fd5
content_feature_list.cc 2.1 KB