Force full placement on every frame when fadeDuration === 0 #7610
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
write tests for all new functionalitypost benchmark scorestagged@mapbox/studio
and/or@mapbox/maps-design
if this PR includes style spec changescc @ansis @mollymerp @mzdraper @tristen