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

Zoom in/out performance issues with a huge number of marker/polyline #5041

Closed
P-Zenker opened this issue Jul 25, 2017 · 6 comments
Closed

Zoom in/out performance issues with a huge number of marker/polyline #5041

P-Zenker opened this issue Jul 25, 2017 · 6 comments

Comments

@P-Zenker
Copy link

Hey,

i've updated from mapbox-gl-js version v0.38.0 to v0.39.1

I have a setup with around 450 nodes (marker) and 1100 edges (polyline):

bildschirmfoto 2017-07-25 um 14 25 48

Expected Behavior

If I zoom in and out I expect a smooth and fast rendering & animation like in v0.38.0

Actual Behavior

There are huge performance issues. It takes around 1 second to compute the very jerky result. Tested with Apple Safari (Version 10.1.1 (12603.2.4)) and Google Chrome (59.0.3071.115 64-Bit).

To clarify my issue, I've made two Quicktime screen videos (mov format):
v0.38.0 vs v0.39.1.zip

With only 30 nodes and edges there are no visible performance issues.

Best regards,
Patrick

@mollymerp
Copy link
Contributor

Hi @PatrickZenker – thanks for reporting this issue. Would you be able to provide a minimal, self-contained jsfiddle/jsbin that illustrates the regression?

@P-Zenker
Copy link
Author

P-Zenker commented Aug 17, 2017

Hey, sorry for my late response.

I've made a jsfiddle but the position of the markers are incorrect: https://jsfiddle.net/kozLk0fn/

Therefore you can view and copy the resources from here:
https://www.catchup-apps.com/jsfiddle/mb_issue_5041_v38.0.html
https://www.catchup-apps.com/jsfiddle/mb_issue_5041_v39.1.html

The line layers are in this very simple example (no logic from us) comment out because of performance issues.

@jfirebaugh jfirebaugh reopened this Aug 17, 2017
@jfirebaugh
Copy link
Contributor

Thanks @P-Zenker, we'll check it out.

@jfirebaugh
Copy link
Contributor

I don't see any lines in either example. Are they correct?

Is there a reason you're creating a separate source and line layer for each individual feature? That's unlikely to perform well under any circumstances. Try creating a single source and layer instead.

@P-Zenker
Copy link
Author

The lines are not important to show the error because the marker themselves have a performance issue if you compare the two versions.

@jfirebaugh
Copy link
Contributor

Ah, ok:

image

There was a forced reflow caused by #4751. This has been fixed for the next release by #5139.

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

3 participants