Skip to content

perf(ui): parallelize independent serial-await loops (bulk delete, domain children) - #30863

Open
harsh-vador wants to merge 1 commit into
mainfrom
perf/w3-parallel-bulk-delete-domain-children
Open

perf(ui): parallelize independent serial-await loops (bulk delete, domain children)#30863
harsh-vador wants to merge 1 commit into
mainfrom
perf/w3-parallel-bulk-delete-domain-children

Conversation

@harsh-vador

@harsh-vador harsh-vador commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Fixes 5445

Description

Two loops issued one round-trip per iteration for fully independent work:

  • useDelete.handleDelete — bulk delete awaited deleteEntity() once per selected row. Now Promise.allSettled over all rows; failed entity names are collected from the rejected results by index, preserving the exact error toast. Deletes target independent entities (no shared version), so parallelizing is safe.
  • DomainSelectableTree — the load-selected-children effect awaited loadChildDomains(fqn) once per selected domain FQN. Now filters the FQNs that need loading, then Promise.all over them.

No behavior change — same requests, same results and error handling, just concurrent.

Left serial intentionally (verified)

  • suggestionsAPI resolveTask loop — comment-documented optimistic-lock constraint
  • cursor-paginated page replays (useLearningResources, useColumnGridListingData), ontology depth-walk, export poll loop — inherently serial
  • DashboardChartTable / KnowledgePageListRightPanel — already Promise.all

Deferred

UploadDocumentModal's serial upload has cancel-mid-batch semantics and needs a bounded concurrency pool (not naive Promise.all, which would break cancellation and could storm the server). Separate careful PR.

Type of change

  • Performance (request waterfall → parallel; no behavior change)

Tests

  • eslint 0 errors, prettier clean
  • yarn test23 DomainSelectableTree tests pass; useDelete has no colocated test (behavior-preserving refactor)

Ref: open-metadata/openmetadata-collate#5442

…main children)

Two loops issued one round-trip per iteration for fully independent work:

- useDelete.handleDelete: bulk delete awaited deleteEntity() once per selected
  row. Now Promise.allSettled over all rows; failed names are collected from the
  rejected results by index, preserving the exact error toast. Deletes are
  independent entities (no shared version), so parallelizing is safe.
- DomainSelectableTree: the load-selected-children effect awaited
  loadChildDomains(fqn) once per selected domain FQN. Now filters the FQNs that
  need loading, then Promise.all over them. Independent per-domain fetches.

No behavior change — same requests, same results/error handling, just concurrent.
23 DomainSelectableTree tests pass; eslint clean.

Left serial intentionally: suggestionsAPI resolveTask loop (comment-documented
optimistic-lock constraint), cursor-paginated replays, and the export poll loop.
UploadDocumentModal's serial upload is deferred — it has cancel-mid-batch
semantics and needs a bounded concurrency pool, not naive Promise.all.

Ref: open-metadata/openmetadata-collate#5442

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@harsh-vador
harsh-vador requested a review from a team as a code owner August 3, 2026 10:08
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically.

Maintainers can bypass this check by adding the skip-pr-checks label.

@github-actions github-actions Bot added the UI UI specific issues label Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

@gitar-bot

gitar-bot Bot commented Aug 3, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Parallelizes independent serial-await loops in bulk delete and domain children using Promise.all and Promise.allSettled to eliminate request waterfalls. No issues found.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar | Powered by Gitar — free for open source

@harsh-vador harsh-vador self-assigned this Aug 3, 2026
@harsh-vador harsh-vador added the safe to test Add this label to run secure Github workflows on PRs label Aug 3, 2026
@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 65%
66.01% (77628/117597) 49.97% (46836/93726) 51.15% (14083/27530)

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — ESLint report could not be read — see the job log.

Errors block the build. Warnings do not yet — they are rules whose backlog is still
being worked down, listed so this PR does not add to it. See docs/ui-code-quality-gate.md.

No machine-readable report was produced.


Fix locally (fast - only checks files changed in this branch):

make ui-checkstyle-changed

@sonarqubecloud

sonarqubecloud Bot commented Aug 3, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 387be40ff5d212b5d3bcb209e15d0516966194ef in Playwright run 30804400618, attempt 1.

✅ 550 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 3 skipped · 🧰 0 lifecycle flaky

Performance

Blocking targets: ✅ met · Optimization targets: 🟡 in progress

Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting.

🕒 Full workflow signal wall (to summary) 52m 26s

⏱️ Max setup 2m 50s · max shard execution 18m 10s · max shard-job elapsed before upload 21m 15s · reporting 3s

🌐 201.25 requests/attempt · 2.83 app boots/UI scenario · 5.41% common-shard skew

Optimization targets still in progress:

  • Browser traffic was 201.25 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.83 per UI scenario (1617 boots / 571 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard chromium-01 139 0 0 3 0 0
✅ Shard chromium-02 136 0 0 0 0 0
✅ Shard chromium-03 124 0 0 0 0 0
✅ Shard data-asset-rules-01 61 0 0 0 0 0
✅ Shard domain-isolation-01 14 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard ingestion-01 1 0 0 0 0 0
✅ Shard reindex-01 2 0 0 0 0 0
✅ Shard search-01 10 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant