Skip to content
This repository has been archived by the owner on Aug 8, 2023. It is now read-only.

Convert GeometryTileWorker to "one-phase" loading #10457

Closed
ChrisLoer opened this issue Nov 13, 2017 · 3 comments
Closed

Convert GeometryTileWorker to "one-phase" loading #10457

ChrisLoer opened this issue Nov 13, 2017 · 3 comments
Labels
Core The cross-platform C++ core, aka mbgl refactor

Comments

@ChrisLoer
Copy link
Contributor

GeometryTileWorker currently maintains a rather complicated state machine to handle "two phase" tile loading logic, in which non-symbol buckets can be rendered before symbol buckets are displayed, and in which a queue of asynchronous requests to redo symbol placement can be interleaved with asynchronous requests that may change tile layout.

PR #10436 removes these requirements: symbol placement is now done on the foreground, and in line with GL JS, tiles no longer render before labels are ready to display.

This means that most of the state transition code in GeometryTileWorker is vestigial, and can be replaced with a much simpler state machine that:

  • Waits for glyph and icon dependencies
  • Supports redoing layout in response to style changes

/cc @jfirebaugh @ansis @kkaefer

@mb12
Copy link

mb12 commented Mar 30, 2018

@ChrisLoer Can you please confirm if there would be a change in behavior or not with one phase loading? With two phase loading, areas and lines appear first on the map even if it takes longer to prepare symbol buckets. This could happen for a couple of reasons like the glyph source timing out or poorly designed / large vector tiles. With 2 phase loading, the user gets a feedback in the form of areas and lines appearing on the screen. Would the same behavior be preserved( or not )with one phase loading?

ChrisLoer added a commit that referenced this issue Mar 30, 2018
Modest simplification refactoring (issue #10457).
Also, fixes issue #11538, which was caused in part by a hole in the vestigial two-phase loading.
@ChrisLoer
Copy link
Contributor Author

@mb12 From the rendering point of view, two-phase loading is already (mostly) gone -- we removed it with the global collision detection changes. At the time, we weighed the benefits of being able to load partial tiles (w/o symbols) against the increasing costs in complexity for maintaining the functionality. We already had trouble keeping bugs out of the two-phase logic, and global collision detection was set to make the problem more challenging, so we decided to remove the functionality.

This issue is mainly about removing vestigial under-the-hood loading logic. The only case I know where it would affect rendering is when already loaded tiles are updated in place (in which case there was still some left-over "two phase" behavior which will disappear).

ChrisLoer added a commit that referenced this issue Apr 2, 2018
Modest simplification refactoring (issue #10457).
Also, fixes issue #11538, which was caused in part by a hole in the vestigial two-phase loading.
@ChrisLoer
Copy link
Contributor Author

Fixed with #11575.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Core The cross-platform C++ core, aka mbgl refactor
Projects
None yet
Development

No branches or pull requests

3 participants