Closed ndmitch311 closed 1 year ago
Kibana's Mapbox GL fetches tiles using a pool of workers, and assumes that tile generation is quick. But with Datashaders, tiles can take 10-30 seconds to render. Ideally a temporary "loading" tile would be returned immediately to free up workers to respond to other web requests. After a short wait, Mapbox GL would then re-request the tile to get the rendered version.
There are also known bugs with cache control in Mapbox GL: https://github.com/spectriclabs/kibana/blob/bbe80cc4a1e363bf6f087261090166b73ed101e9/x-pack/plugins/maps/public/connected_components/mb_map/mb_map.tsx#L245
Note that Kibana now uses maplibre instead of mapbox, presumably due to mapbox moving away from an OSS license. It looks like this issue has been fixed in maplibre even though it was forked before the fix was implemented in mapbox (https://github.com/mapbox/mapbox-gl-js/issues/10031).
https://github.com/elastic/kibana/blob/v7.16.3/packages/kbn-mapbox-gl/src/index.ts#L27
This has been ported to FastAPI and appears to be working. It is ready for more in-depth user testing. See https://github.com/spectriclabs/elastic_datashader/tree/issues/9
@desean1625 made some fixes in 4b620ec60a9a1607b11d6d7e955cc34b88e4d301, and this appears to be working.
It would improve the Kibana user experience if a tile request returned immediately while the lengthy tile generation process continued.