Answer a thumbnail miss with the other stored class before the network
Offline, a grid zoomed past 256px was blank wherever it had not been zoomed over before. The store was asked only for the exact class the cell wanted, and the sweep stores only the grid class, so every zoomed cell missed and went to a server that was not there — with its 256px thumbnail sitting in the store the whole time. Online it cost the same round trip, just without the blank cell at the end of it. The split now tries the other class on a miss. A smaller one stands in and the fetch for the real class still goes out; a larger one answers the request outright, since there is nothing a fetch would improve on. `ThumbnailReady` carries the class its pixels are, and the drain records that rather than the batch's class, so a stand-in is replaced on the next reload instead of being counted as served. `already_served` counts a held large thumbnail as serving the grid class too, so zooming back out does not re-read the store for pixels already on screen. The split moves into `split_by_store` so it can be tested without a worker thread or a network.
This commit is contained in:
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user