perf(editor): Avoid deep watch on execution result data (#15304)

This commit is contained in:
Suguru Inoue
2025-05-12 17:01:39 +02:00
committed by GitHub
parent 52bf9203f0
commit cd2e2dc8d9
3 changed files with 10 additions and 11 deletions

View File

@@ -5,7 +5,6 @@ import { Workflow } from 'n8n-workflow';
import { useWorkflowsStore } from '@/stores/workflows.store';
import { useNodeHelpers } from '@/composables/useNodeHelpers';
import { useThrottleFn } from '@vueuse/core';
import { IN_PROGRESS_EXECUTION_ID } from '@/constants';
import {
createLogEntries,
deepToRaw,
@@ -58,13 +57,6 @@ export function useExecutionData() {
};
});
const updateInterval = computed(() => ((execution.value?.tree.length ?? 0) > 10 ? 300 : 0));
const runStatusList = computed(() =>
workflowsStore.workflowExecutionData?.id === IN_PROGRESS_EXECUTION_ID
? Object.values(workflowsStore.workflowExecutionData?.data?.resultData.runData ?? {})
.flatMap((tasks) => tasks.map((task) => task.executionStatus ?? ''))
.join('|')
: '',
);
function resetExecutionData() {
execData.value = undefined;
@@ -78,7 +70,7 @@ export function useExecutionData() {
() => workflowsStore.workflowExecutionData?.id,
() => workflowsStore.workflowExecutionData?.workflowData.id,
() => workflowsStore.workflowExecutionData?.status,
runStatusList,
() => workflowsStore.workflowExecutionResultDataLastUpdate,
],
useThrottleFn(
() => {