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

Performance problems with more than 150 paths #37

Open
a1an77 opened this issue Jan 8, 2016 · 3 comments
Open

Performance problems with more than 150 paths #37

a1an77 opened this issue Jan 8, 2016 · 3 comments

Comments

@a1an77
Copy link

a1an77 commented Jan 8, 2016

I have a number of paths to display that can grow large at lower zoom levels, hence I noticed a sensible performance degradation when displaying more than 100 paths, up to few hundreds. Around 200 it takes a bit more than 3 seconds to get them on the map at 700 it gets up to 7 seconds, which is a bit too much for an interactive map.

With a bit of profiling in FF I pointed out the issue to lie at textRedraw and setText methods.

Attached a section of the profile which indicates in green the time taken to populate a layer with labelled paths, while the darker red section shows the time taken to add event handlers to the same number of paths.

proportion_labeled_poligons

To be noted also that most of the paths, since they are at a low zoom level (hence seen from up above) end up with having no label at all as it won't fit the path.

@leplatrem
Copy link
Collaborator

Thanks for your feedback!

Don't hesitate to open a pull-request if you have ideas of optimizations!

@nekromoff
Copy link

Confirming with 100+ paths.

@jeetdas
Copy link

jeetdas commented Jul 9, 2019

Any updates here?

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

No branches or pull requests

4 participants