From 0a3013493d2cfbb9fb62d5fbc8696d207174e38a Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Mon, 10 Mar 2025 17:17:52 +0100 Subject: [PATCH] nit perf improvements --- .../src/lib/components/FlowStatusViewerInner.svelte | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/frontend/src/lib/components/FlowStatusViewerInner.svelte b/frontend/src/lib/components/FlowStatusViewerInner.svelte index 8295a02c45..c95bffd2d0 100644 --- a/frontend/src/lib/components/FlowStatusViewerInner.svelte +++ b/frontend/src/lib/components/FlowStatusViewerInner.svelte @@ -126,11 +126,11 @@ }) } - const sameArgs = deepEqual(state[key]?.args, newValue.args) - const sameResult = deepEqual(state[key]?.result, newValue.result) - const sameJobId = state[key]?.job_id == newValue.job_id - if (!sameArgs || !sameResult || !sameJobId) { - // console.log('updateModuleStates', key, newValue) + if ( + state[key]?.job_id != newValue.job_id || + !deepEqual(state[key]?.args, newValue.args) || + !deepEqual(state[key]?.result, newValue.result) + ) { moduleState.update((state) => { state[key].args = newValue.args state[key].result = newValue.result