You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 8, 2023. It is now read-only.
When a user rotates the map, the main thread will queue many placement requests to the worker threads (one for each incremental bit of rotation). If the worker threads start producing responses to the placement requests faster than the main thread can draw them (perhaps the main thread is doing something else that's expensive besides just drawing the map), a backlog of placement results will build up.
Specifically:
Each GeometryTile contains a Mailbox that will have a queue of onPlacement messages.
The main thread RunLoop will pop the first message out of each 'Mailbox' and process it, triggering GeometryTile::onPlacement calls for each tile, which will trigger a paint call through Map::Impl->onUpdate. These will all get coalesced into one queued paint request. The RunLoop will also queue a request to process the next item in each non-empty Mailbox
The process repeats with one paint call for each onPlacement message in a Mailbox, even though only the latest message has up-to-date results.
The time-lagged placement calls can lead to label flicker:
When a user rotates the map, the main thread will queue many placement requests to the worker threads (one for each incremental bit of rotation). If the worker threads start producing responses to the placement requests faster than the main thread can draw them (perhaps the main thread is doing something else that's expensive besides just drawing the map), a backlog of placement results will build up.
Specifically:
GeometryTilecontains aMailboxthat will have a queue ofonPlacementmessages.RunLoopwill pop the first message out of each 'Mailbox' and process it, triggeringGeometryTile::onPlacementcalls for each tile, which will trigger a paint call throughMap::Impl->onUpdate. These will all get coalesced into one queued paint request. TheRunLoopwill also queue a request to process the next item in each non-emptyMailboxonPlacementmessage in aMailbox, even though only the latest message has up-to-date results.The time-lagged placement calls can lead to label flicker:
/cc @jfirebaugh @mourner