-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement cross-source symbol placement #2703
Comments
@mollymerp I've updated the top of #2667 with the current status and outstanding tasks. Assuming broad 👍 to the overall design there, I think it's actually not too far from being 🚢-able. |
This looks great @mollymerp!
|
Some architectural doodlings... - `TileStoreCache` wraps `TileStore` to provide tile caching - `TileStore` (name up for debate) exposes a `loadTile(coord, callback)` method. There is one tile per coordinate. - `SourceCache` wraps `Source` to provide source tile caching - `Source` exposes a `loadTile(coord, callback)` method. There is one "source tile" per coordinate per source. All of this class's expensive operations are set to the worker. - `WorkerSource` does all the heavy lifting for `Source` - _tile combinator and symbol placer_ is a module within the worker that combines tiles and places symbols |
I think the main thread
I'm not sure about this.
Conceptually, not at all. What you're doing is a new & separate task for the workers.
@anandthakker is working on everything from |
💭 Looking over my diagram above with a couple months retrospect, I wonder if we need to keep a |
@lucaswoj good point! Although, along the lines of #2951, I do think there are good use cases for caching things at a finer level of granularity than the fully-baked, ready-to-render tiles: e.g., maybe caching something like the |
Hey all! Wanted to see what the latest was here. Is there still interest in getting this in? If so, would a PR be welcome? |
@vicapow this is not being actively worked on – we'd love to see a PR 😸 |
I believe this is fixed in #5150 -- global/viewport collision detection gave us cross-source symbol placement as a bonus feature! Some of the refactoring discussed above has long since merged, but otherwise the implementation we actually landed doesn't follow the Since I'm not super-familiar with this ticket, please re-open if I'm missing an important part. |
Prior 🎨 can be found at #2516 + #2624 + #1042
Per chat in Slack today, we will be moving forward with a big 💪 refactor that will allow our cross-source symbol placement dreams to become a reality. 🌈
Here is a brain dump based on what I understand from @yhahn @jfirebaugh @ansis @lucaswoj:
Goal:
TilePyramid
-Source
relationship so that instead of having many sources with their ownTilePyramid
s storing data on eachTile
for that source, we have oneTilePyramid
and eachTile
id would represent an array ofTile
information for every source in the style.Options:
TilePyramid
can dispatch a worker toplaceFeatures
after all tiles have been sent back to the main thread with their symbol placement info (from make symbol placement information transferrable between workers #2624)TilePyramid
would dispatch all tiles under a givenid
in theTilePyramid
to the same worker to compute placement informationIn chat, it seemed like the latter is preferred ( @jfirebaugh ?) If so, the work from make symbol placement information transferrable between workers #2624 was purely educational for me 😭
☝️ – please correct or edit as you see fit if I got something wrong
Questions that need answering (by me or anyone else):
TilePyramid
. What would that look like and what benefits does it offer?Worker
tasks be affected? @jfirebaugh says 👇Future expansion of the
TilePyramid
refactor for rendering perf improvements (from slack mostly)I plan on 💭 on the questions above to solidify my understanding of the task. Once we've settled on the approach we want to take going forward, I will put together a more detailed roadmap of the process and start a PR. Comments / thoughts welcome!!
The text was updated successfully, but these errors were encountered: