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

Markers animation performance #2257

Closed
misterfresh opened this issue Mar 11, 2016 · 3 comments
Closed

Markers animation performance #2257

misterfresh opened this issue Mar 11, 2016 · 3 comments

Comments

@misterfresh
Copy link

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 ?

@lucaswoj
Copy link
Contributor

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.

@emperor1412
Copy link

emperor1412 commented Jun 4, 2017

@lucaswoj here you can find a demo, try to add like 20 cars and you will see
Test Mapbox

and stackoverflow thread:
https://stackoverflow.com/questions/44356979/mapbox-gl-js-marker-icon-animation-slow-performance

@misterfresh
Copy link
Author

misterfresh commented Jun 5, 2017

@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/

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

No branches or pull requests

3 participants