Skip to content
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

transferrable symbol buffer quest #2516

Closed
mollymerp opened this issue Apr 29, 2016 · 1 comment
Closed

transferrable symbol buffer quest #2516

mollymerp opened this issue Apr 29, 2016 · 1 comment
Assignees

Comments

@mollymerp
Copy link
Contributor

mollymerp commented Apr 29, 2016

This is step 1 to make cross-source label collision detection and placement possible.
Prior discussion on this topic at #1042
Plan is for me to tackle this with support from @yhahn. Thanks x 💯 to @ansis for helping think this through.

Goal:

Let information needed to do symbol placement be transferrable as an array buffer between workers + main thread.

To do this, we need to:

  1. Because we can only add typed numbers to a structArrayType, we first have to convert symbolInstance.glyphQuads into a structArrayType in a manner similar to the collisionBoxArray
  2. using the results from 1. convert the symbolInstances array into a structArrayType
  3. instead of calling placeFeatures() in symbol_bucket.js and worker_tile.js, add this new symbolInstancesStructArray aka symbolBuffer to workerTile.js here to transfer it back to the main thread
  4. make modifications to other files in js/source/ to make sure the transferred data is available where needed
  5. create a process to transfer the symbol_buffer data to a new worker where it could be processed together with symbol_buffers from other sources using placeFeatures() at that time.

When that is all done, we plan on starting another quest! Thoughts on that from @yhahn:

Cross-source placement quest

Goal: get all symbol buffers for a tile to a single worker so it can manage collision for the symbol buffers all at once.

This quest is a lot more murky to me because I am not familiar with the tile pyramid and sources yet.

  • Use a single tile pyramid rather than a pyramid per source
    • Why: so that the single pyramid can determine when all workers have sent back symbolbuffers for a tile to trigger a single placement event that has all the symbolbuffer information for that tile
  • Sources live under the single tile pyramid and manage appropriate tile based on what the tile pyramid needs/requests (?)
  • Workers' handling of messages/buffers remains the same (?)
  • Main process needs to manage symbol layers differently from others, receiving symbol buffers and queuing work for the symbol placement worker
@mollymerp
Copy link
Contributor Author

Closing here since #2642 has 🚢'd
Thoughts on cross-source placement quest 👉 #2703

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant