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

Fix performance issue with refreshing features #1346

Merged
merged 1 commit into from
Dec 6, 2022
Merged

Fix performance issue with refreshing features #1346

merged 1 commit into from
Dec 6, 2022

Conversation

patrickarlt
Copy link
Contributor

This should resolve #1340 which is a result of an error I made in #1304.

  1. In Fix FeatureLayer.refresh for moved point layers #1304 I added a call to redraw.
  2. Internally this eventually called resetStyle
  3. resetStyle calls resetFeatureStyle on every feature in the layer. This ends up causing a huge amount of extra calls since it calls since the happens N * N times.

This PR simply changes this to call resetFeatureStyle directly for the specific feature.

@patrickarlt patrickarlt requested a review from gavinr December 5, 2022 22:44
Copy link
Contributor

@gavinr gavinr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great! I tested the performance issue from #1340 and it does seem to fix that case.

@gavinr gavinr merged commit 4e89973 into master Dec 6, 2022
@gavinr gavinr deleted the fix-1340 branch December 6, 2022 04:51
@gavinr
Copy link
Contributor

gavinr commented Dec 12, 2022

This has been released in v3.0.9
https://jsbin.com/qubokaculi/1/edit?html,output is the demo case using v3.0.9 and it is working.

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

Successfully merging this pull request may close these issues.

featureLayer rendering performance
2 participants