API polling can be fairly expensive, yet most of the time no state change is performed. This makes it ideal for a background task that can be polled by the map every ~second to keep the map up-to-date without blocking any rendering operations. requestIdleCallback() could prove useful as well.
API polling can be fairly expensive, yet most of the time no state change is performed. This makes it ideal for a background task that can be polled by the map every ~second to keep the map up-to-date without blocking any rendering operations.
requestIdleCallback()could prove useful as well.