disk_cache::MemBackend --- fix GetAvailableRange over big, sparse ranges
Previous code both would perform very badly --- as it's scanning over 4K increments, which is iffy if there is a big hole in the middle --- and could also suffer from wrap around in index computations (an alternative may be to fix just that...) This change replace hash table keeping track of ranges with the ordered std::map, which makes finding adjacent kids easy. Bug: 808561 Change-Id: I3442bbbf6c0e4bc6089ba89265ebb27d739d7edc Reviewed-on: https://chromium-review.googlesource.com/901862 Commit-Queue: Maks Orlovich <morlovich@chromium.org> Reviewed-by:Matt Menke <mmenke@chromium.org> Cr-Commit-Position: refs/heads/master@{#534731}
Showing
Please register or sign in to comment