-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
Markers animation performance #2257
Comments
Hi @misterfresh! The GitHub issue tracker isn't the right place for us to answer this question. It is reserved for bug reports and feature requests only. I encourage you to ask this question on StackOverflow with an executable demo of how you're doing animation. We are tracking some performance improvements relevant to animation in #1504 and #2224. |
@lucaswoj here you can find a demo, try to add like 20 cars and you will see and stackoverflow thread: |
@emperor1412 if you want to animate more than a couple items, it is not very efficient to do it in JS. Better do it in the shaders to use the GPU. http://misterfresh.github.io/mapbox-animation/ |
I'm trying to animate markers in a geojson feature collection.
I get between 15 and 20 fps with less than 10 markers, and the more markers I add the more the fps drops.
So I have questions regarding optimization :
Would it be better to split the markers in several layers?
I thought about using web workers but the cost of transferring the json between threads 20 times per second will negate any performance gain I believe
Is there a throttling going on inside mapbox gl? Even with the simple animate point example from the documentation I can reach maximum 32 fps and usually between 25 and 30.
What advice / best practice do you recommend for getting more fps in animation ?
The text was updated successfully, but these errors were encountered: