-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
remove map.batch
and automatically batch style changes
#2343
Comments
Yes, I think this would be ideal, although implementation may be tricky. cc @scothis |
I think this is safe and good, we're effectively taking methods that were partially sync and partial async and pushing the balance more towards async. It could break a user if they made a mutation and expected to be able to query against it immediately. Given that the stylesheet mutation can still be done sync before deferring the heaving lifting async, this should be fine. |
Yeah, it would be nice to have the style API work like the DOM API: mutations are reflected immediately in subsequent API accessor methods, but as much heavy work as possible is delayed until the next frame tick, at which time duplicate work is coalesced. |
I propose that we
|
I think we should automatically batch all style changes that happen between frames. Are there any cases where we wouldn't want to batch style changes?
If changes are automatically batched we can remove
map.batch
.The text was updated successfully, but these errors were encountered: