Skip to content

Conversation

@steve-the-edwards
Copy link
Contributor

@steve-the-edwards steve-the-edwards commented Feb 12, 2025

When we kept rendering for CONFLATE_STALE_RENDERINGS we were not also checking if we should short circuit. We need to do both.

If any of the actions applied produces output from the root runtime though, then we will stop applying actions, update the rendering, and then send the output.

Short circuit if there is no changed state while conflating.
@steve-the-edwards steve-the-edwards changed the base branch from main to sedwards/fix-output-tests February 20, 2025 16:17
*/
suspend fun shortCircuitForUnchangedState(actionResult: ActionProcessingResult): Boolean {
if (runtimeConfig.contains(RENDER_ONLY_WHEN_STATE_CHANGES) &&
fun shouldShortCircuitForUnchangedState(actionResult: ActionProcessingResult): Boolean {
Copy link
Collaborator

Choose a reason for hiding this comment

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

new tongue-twister just dropped

var actionResult: ActionProcessingResult = runner.processAction()

if (shortCircuitForUnchangedState(actionResult)) continue
if (shouldShortCircuitForUnchangedState(actionResult)) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is much better.

Base automatically changed from sedwards/fix-output-tests to main February 21, 2025 19:21
@steve-the-edwards steve-the-edwards merged commit 56e6ee0 into main Feb 21, 2025
31 checks passed
@steve-the-edwards steve-the-edwards deleted the sedwards/fix-conflate branch February 21, 2025 21:53
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.

4 participants