globe.gl icon indicating copy to clipboard operation
globe.gl copied to clipboard

Hexed Polygons and Custom Layer with lag

Open vikgmdev opened this issue 5 years ago • 4 comments

Describe the bug I created my own custom layer based on the example that you have and I tried to combine it with the new Hexed Polygons Layer but it is not working properly, take a look to the videos for a better explanation:

For the videos, I used the Custom and the Hexed examples, but happens the same with my own layer:

To Reproduce

Expected behavior The animation of the custom layer should be as fluid as this: Map

But when I add the Hexed the custom layer animation reproduce with a lot of lag: Map-1

I tried to debug but didn't find a solution.

vikgmdev avatar Nov 09 '19 07:11 vikgmdev

The current hexed polygons layer is rather heavy as it generates a large number of polygon geometries. The higher the hex resolution, the worse it gets. This needs some profiling to see if something can be done to optimize the performance, but it's a tough one I think. For now what you can to alleviate the strain is to lower the hexPolygonResolution.

vasturiano avatar Nov 09 '19 09:11 vasturiano

@vikgmdev you only thing your can try rightnow is lower the hexPolygonResolution to improve some performance

Otherwise, it requires a new method to create hex polygon layer. e.g. a simple polygon geometry with custom shader or texture to simulate hexes. But it's complex, hope someone could done in the future

lslzl3000 avatar Jul 17 '20 14:07 lslzl3000

@vikgmdev I've done some improvements to the geometries on the hexed polygons layer, and it's performing much better. See the example at: https://globe.gl/example/hexed-polygons/

Available in the latest version: v2.12.4.

vasturiano avatar Jul 22 '20 08:07 vasturiano

Thanks, @vasturiano @lslzl3000 I'll give it a try and let you know how it performs

vikgmdev avatar Jul 23 '20 21:07 vikgmdev