Closed T-moz closed 1 week ago
I red through the linked issue https://github.com/maplibre/flutter-maplibre-gl/issues/366 and think that the discussed solution to add a low level-ish method like addEncodedGeoJsonSource
would be a better solution.
I hope it's alright if I close this pull request? If not, just let me know. (:
Fixes https://github.com/maplibre/flutter-maplibre-gl/issues/366
Wrapping
jsonEncode
in acompute
allow data encoding without blocking the main isolate. BUT Spawning multiple isolate is very expensive, and can lead to crash. So this technique is better used when encoding multiple geojsonFeature.Currently, I have a performance issues on my app, when updating multiple lines. So I coded a fix that solves only this issue. But this principle could be applied to symbols, circles, polygones, and to the method
setGeoJsonSource
.I willing to work on this, but first, I need review and feedbacks on this first implementation 🙏.