Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow state update for animated GeoJSON layer when frequently zooming or on firefox desktop #1577

Closed
karussell opened this issue Sep 20, 2021 · 4 comments
Labels

Comments

@karussell
Copy link
Contributor

Firefox (linux/desktop) has a problem to render GeoJSON animations smoothly. When you open the geojson-animation examples with Firefox v92.0 you will not see a smooth animation - it looks like many frames are skipped. When I make the browser smaller then it is much smoother.

On mobile Firefox v92.1.1 (Android) viewing this example is fine, but as soon as you zoom in and out frequently you will get the same lagging / delay problem. With continuous zooming in+out you can basically cause that the circle stands still.

Chrome is working fine on Desktop and Android also with heavy zooming. (Maybe something the firefox team needs to investigate? I hope it is ok to ping @jrmuizel who was involved in a similar issue #909.)

In our real world applications this is a problem when we trigger viewport changes due to a transitionInterpolator which is likely identical to the "frequent zooming". I.e. then state changes are never (or only very late) transferred to the associated GeoJSON layer which can be just a circle like in the example. And this delay problem increases when the animation duration is increased.

The option asyncRender=true does not help in our case and it is no option for us as the state-to-map synchronization is important. I can try this comment and see if the situation is improved, but I would need a code example :)

Is there e.g. a possibility to say that the animation changes are less important than updates to the layers?

btw: I think here the comment should be "global.requestAnimationFrame"?

@karussell karussell added the bug label Sep 20, 2021
@karussell
Copy link
Contributor Author

karussell commented Sep 22, 2021

As a follow up. I've created https://bugzilla.mozilla.org/show_bug.cgi?id=1732049

@Pessimistress
Copy link
Collaborator

Do you see the same issue here? https://docs.mapbox.com/mapbox-gl-js/example/animate-point-along-line/

@karussell
Copy link
Contributor Author

Yes, indeed (But only when I open it in codepen where the map is bigger).

Still the lagging is not that severe which might be because of a smaller radius the circle goes or something else? So likely not an issue of react-map-gl?

@Pessimistress
Copy link
Collaborator

Performance issues are being addressed in v7.0. Please follow #1646

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants