Skip to content

perf: reduce cloning and serialization in execution views - #943

Open
shayansadeghieh wants to merge 1 commit into
flyteorg:masterfrom
shayansadeghieh:fix/execution-view-performance
Open

shayansadeghieh wants to merge 1 commit into
flyteorg:masterfrom
shayansadeghieh:fix/execution-view-performance

Conversation

@shayansadeghieh

Copy link
Copy Markdown
Contributor

TL;DR

Reduce repeated cloning and JSON serialization in execution views for large, nested workflows. Polling and expansion now reuse unchanged execution records, compiled graph data, and derived table rows.

For example, when one task changes from RUNNING to SUCCEEDED, the current implementation clones and compares the whole known execution map. Expanding a nested node also rebuilds the graph and serializes derived structures to decide whether to update state. With large literal input bindings, those operations repeatedly traverse the same payloads and can make the UI unresponsive.

Type

  • Bug Fix
  • Feature
  • Plugin

Complete description

  • Compare and merge incoming execution records individually, preserving unchanged records and avoiding a state update when the merged result is unchanged. Keep the update callback stable across polls.
  • Memoize the base graph by compiled workflow closure and apply expansion/parent metadata separately. Shallow-copy changed nodes and ancestors while sharing unchanged children and compiled payloads.
  • Derive filtered and flattened table rows with memoization instead of storing them in effect-driven state and comparing them through JSON serialization. Preserve expansion state and refresh phase filtering when execution statuses change.
  • Make the dynamic-node polling effect depend on its data and success state rather than the query wrapper's identity.

Newly loaded dynamic workflow definitions still rebuild the base graph, partial execution responses retain existing fields, and the polling interval is unchanged.

Validation

  • 16 tests passed across WorkflowNodeExecutionsProvider, NodeExecutionsTable, WorkflowGraph, and TimelineChart on the current upstream base.
  • Added regression coverage for graph reuse, immutable metadata updates, nested expansion, partial-response merging, unchanged polling results, and phase-filter updates.
  • ESLint passed for all five changed files; git diff --check passed.
  • Manual use of a nested synthetic execution showed faster expansion. No numerical end-to-end speedup is claimed here.

Are all requirements met?

  • Code completed
  • Smoke tested
  • Unit tests added
  • Code documentation added

Tracking Issue

None.

Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
Signed-off-by: Shayan Sadeghieh <shayansadeghieh@stripe.com>
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
@shayansadeghieh
shayansadeghieh force-pushed the fix/execution-view-performance branch from 85c1e1b to 1eec390 Compare October 10, 2026 20:06
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.

1 participant