Repository navigation
Store large circle sets by place, so a zoomed-in tile reads only the blocks round it - #46
Merged
Merged
Conversation
…blocks round it The circle file kept its records in list order, 512 to a block with 48 blocks cached, so a tile's circles lay in most of the file: on the national antenna set a z12 tile over New York needed 436 of 1,414 blocks. CircleTileSet now writes the file in Z-order of each circle's z12 cell (a stable radix sort of 24-bit keys, the same key as js-sdk-core). Indices stay the list's: the storage translates them, and the grid index, its box checks and forEachRecord walk the storage order. The GPU recording keeps the drawn-last circle per dot pixel and adds the circles in list order.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The same change as MapConductor/js-sdk-core#48, for Android.
Cause
Change
CircleTileSetwrites the file in Z-order of each circle's z12 cell. It uses a stable radix sort of 24-bit keys (StorageOrder.sortedBy), and the key is the same as js-sdk-core's (StorageOrder.mortonCellKey).storageOrder). The grid index build, its box checks andforEachRecordwalk the file in storage order.forEachRecordcalls come in storage order, andksays which index each one is. The GPU recording keeps the drawn-last circle per dot pixel and adds circles in list order (DeferredCircles).Measured: Pixel 5a, 9 tiles drawn on the GPU from the real antenna data, two rounds each.
At z14 the per-tile cost (draw and encode) dominates, so the gain there is smaller.
Tests
ShapeTileGpuDeviceTestnow also checks that a file stored by place gives the same GPU tile as index order (0 differing pixels) and matches the canvas.CircleTileFileDeviceTestpasses.apiCheckpasses: the new types are internal.