Skip to content

DRAIN_EXCLUSIVE_ACTIONS implementation #1355

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

Open
wants to merge 1 commit into
base: sedwards/dea-2
Choose a base branch
from

Conversation

steve-the-edwards
Copy link
Contributor

Add an option to get the next action that is mutually exclusive to the dirty nodes. Then we can apply as many of those actions as possible.

Add tests for this as well and ensure existing tests can run with this runtime config on.

@steve-the-edwards steve-the-edwards force-pushed the sedwards/dea-2-for-real branch 4 times, most recently from b276a5b to eefc6d8 Compare June 20, 2025 20:56
@steve-the-edwards steve-the-edwards marked this pull request as ready for review June 20, 2025 20:57
Copy link
Collaborator

@zach-klippenstein zach-klippenstein left a comment

Choose a reason for hiding this comment

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

I don't understand the interaction between conflation and drainExclusive. It looks like we run the drainExclusive loop first, then render, then conflate, drainExclusive, and render, etc. Wouldn't we want to continuously interleave drainExclusive and conflation passes? Or is that what we're doing and I just can't read code?

): Unit = Unit

public sealed interface RuntimeLoopOutcome
public sealed interface RuntimeUpdate
Copy link
Collaborator

Choose a reason for hiding this comment

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

At the risk of over-optimizing, this could be a value class to avoid allocating RenderingProduced objects every pass even when they're ignored.

}

@Test
fun `for_drain_exclusive_and_render_only_when_state_changes_we_handle_multiple_actions_in_one_render_but_we_do_pass_rendering_if_state_changed_earlier`() {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: You shouldn't need the backticks here, you're not using spaces or other illegal characters.

@steve-the-edwards steve-the-edwards force-pushed the sedwards/dea-2-for-real branch from e6b2344 to 1551901 Compare June 24, 2025 14:18
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