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

Force full placement on every frame when fadeDuration === 0 #7610

Merged
merged 1 commit into from
Nov 21, 2018

Conversation

ChrisLoer
Copy link
Contributor

@ChrisLoer ChrisLoer commented Nov 21, 2018

Fixes issue #7609: fadeDuration 0 didn't ensure every symbol would render immediately, if collision detection took longer than 2ms.

This change will potentially make each frame more expensive to render with frameDuration: 0, but that option already makes frames more expensive, and the whole point is to make symbol collision changes instant.

This issue technically affects our test suite, but because it depends on collision detection going longer than 2ms, we've never (or perhaps very rarely?) seen it. The test suite doesn't have tests with large enough viewport/complex-enough style to get near that limit during normal operation.

I can't think of a satisfying non-contrived automated test for this change. I manually tested the change on a debug page with a large viewport that reliably pushed collision detection over 2ms. The key visual thing I was looking at was making sure that symbols were fully rendered in the frame drawn before we fire the load event.

Launch Checklist

  • briefly describe the changes in this PR
  • write tests for all new functionality
  • document any changes to public APIs
  • post benchmark scores
  • manually test the debug page
  • tagged @mapbox/studio and/or @mapbox/maps-design if this PR includes style spec changes

cc @ansis @mollymerp @mzdraper @tristen

Fixes issue #7609: fadeDuration 0 didn't ensure every symbol would render immediately, if collision detection took longer than 2ms.
@ChrisLoer ChrisLoer merged commit 5401d2f into master Nov 21, 2018
@ChrisLoer ChrisLoer deleted the skip-collision-fade branch November 21, 2018 21:36
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.

2 participants