liwenjie200543 opened a new pull request, #74491:
URL: https://github.com/apache/airflow/pull/74491

   closes: #74398
   
   ## Description
   
   The Graph View layout regression reported in #74398 (nodes crowding toward 
the center line, sharp edge angles, overlapping parallel edges) was introduced 
by #65031, which set `elk.layered.nodePlacement.strategy: SIMPLE` to cut layout 
latency.
   
   I reproduced the issue locally with elkjs on a synthetic 84-node / 105-edge 
DAG, comparing the pre-#65031 configuration against the current one:
   
   | Configuration | Edge bends | Vertical spread | Independent y-bands (of 84) 
| Layout time |
   |---|---|---|---|---|
   | 3.1.x default (BRANDES_KOEPF) | 160 | 3259 | 65 | 315 ms |
   | 3.3.2 current (SIMPLE + thoroughness 3) | 246 (+54%) | 1211 (−63%) | 25 | 
133 ms |
   | This fix (BRANDES_KOEPF + thoroughness 3 kept) | 170 | 3119 | 69 | **105 
ms** |
   
   The single-pass `SIMPLE` strategy is what squeezes nodes toward the center 
line; `BRANDES_KOEPF` (the ELK default, removed by #65031) restores the 
pre-regression distribution. With `elk.layered.thoroughness: 3` still kept for 
large graphs, layout time is actually lower than before — the latency goal of 
#65031 is preserved.
   
   Since this is a UI change: the quantitative metrics above stand in for 
screenshots; happy to add before/after screenshots if reviewers want them.
   
   ## Tests
   
   - Added a regression test asserting the root layout options no longer set 
`nodePlacement.strategy` (so ELK uses its default BRANDES_KOEPF).
   - Added a test guarding the perf behavior kept from #65031: 
`elk.layered.thoroughness: 3` is applied only for graphs with >100 edges (note: 
test edges must be unique — `rewriteGroupEdges` deduplicates by (source, 
target)).
   - Verified locally by bundling `elkGraphUtils.ts` with esbuild and running 
the assertions against elkjs (3/3 passing), plus `prettier --check` on both 
touched files; CI vitest runs the same suite.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes (please specify the tool below)
   
   Generated-by: WorkBuddy AI agent (GLM) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to