Open hyperknot opened 2 years ago
I tested the official examples:
So I suspect it has to be something with the controller: true
part. Interestingly get-started/pure-js/mapbox
works well while the basic version doesn't.
I'm unable to reproduce this issue.
It's understandable if React causes some performance overhead. It's also a known issue that the second monitor of Mac suffers from WebGL performance degradation. However, I've never heard of any issue with the basic usage pattern. And as you have noted, the problem is not consistent across the examples.
Can you maybe try on a different computer?
I'm working on better examples for reproducing the issue. The results I got were confusing as the NE countries GeoJSON makes dropped frames with deck.gl on its own, so the examples listed weren't meaningful.
I'll try to get better minimal cases and report them here.
Description
When using DeckGL with a Mapbox map (maplibre fork), the performance gets bad, there are lot of dropped frames in Chrome FPS meter (red lines). The overall interactivity feels very laggy / sluggish. I mean just panning around with a mouse.
Removing the DeckGL component around
There are no layers, no state, no interactivity, just panning around with mouse:
Note: if you are on bleeding edge hardware like M1 Macbooks this might not be visible. Try it on an older Macbook to see it happening.
Flavors
Expected Behavior
Performance should be the same as of using react-map-gl. There should be no dropped frames.
Steps to Reproduce
Bad performance code:
Good performance code:
I've just tested a pure code and it gets the same dropped frames / bad performance behaviour as with the Mapbox layer. So it's not related to the Mapbox layer, it seems to be coming from Deck GL. Code below:
Environment
Logs
Nothing displayed.