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
The API of TileProcessor is designed to allow registering vector tiles style and then operating only on its id. This is done in particular to optimize data transfer when doing tile decoding in the web workers. Since the memory cannot be shared between the main process and the web worker (for now at least), we want to serialize and send as little data as possible.
At the moment style is being sent in full with every tile to be decoded. Instead, we want to send the styles only when they are registered and then with the tiles send only style id.
This would require some kind of synchronization in WebWorkerVtProcessor as add_style and drop_style methods are synchronous, but process_tile is async. There must not be a situation when adding a style is called, then we ask to process a tile but the web worker doesn't have the style yet so it responds with an error.
The text was updated successfully, but these errors were encountered:
The API of
TileProcessor
is designed to allow registering vector tiles style and then operating only on its id. This is done in particular to optimize data transfer when doing tile decoding in the web workers. Since the memory cannot be shared between the main process and the web worker (for now at least), we want to serialize and send as little data as possible.At the moment style is being sent in full with every tile to be decoded. Instead, we want to send the styles only when they are registered and then with the tiles send only style id.
This would require some kind of synchronization in
WebWorkerVtProcessor
asadd_style
anddrop_style
methods are synchronous, butprocess_tile
is async. There must not be a situation when adding a style is called, then we ask to process a tile but the web worker doesn't have the style yet so it responds with an error.The text was updated successfully, but these errors were encountered: