⚡ Bolt: React Flow 렌더링 성능 최적화 (WeakMap 캐시 도입)#574
Conversation
- `App.tsx`의 `visibleNodes`에서 노드 드래그(60fps) 시 불필요한 `node.data` 객체 할당을 방지하고 `React.memo` 참조를 유지하도록 `WeakMap` 캐시 적용. - `search.ts`의 `findSearchMatchedNodeIds` 검색 로직에도 `node.data` 기반의 `WeakMap` 캐시를 도입하여 드래그 중 O(N*C) 탐색 재실행 방지. - `cardinalityColumns` 의존성 배열을 객체 참조(cardinalityNode)에서 데이터 참조(cardinalityNode?.data)로 변경하여 렌더링 최적화.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
There was a problem hiding this comment.
Pull request overview
OpenCode cannot approve yet because required coverage evidence did not pass.
Review outcome
1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
-
Problem: The required coverage-evidence job result was
failure, so OpenCode cannot establish approval sufficiency for this head. -
Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.
-
Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present. -
Result: REQUEST_CHANGES
-
Reason: coverage-evidence result was
failure, so required test/docstring evidence was not proven for current headd938f8fe3930e5cd405ba4546a9acef0528e13af. -
Head SHA:
d938f8fe3930e5cd405ba4546a9acef0528e13af -
Workflow run: 29452737719
-
Workflow attempt: 1
Coverage evidence
Coverage evidence job did not run or did not publish coverage evidence.
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file: bolt.md"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file: bolt.md"]
R1 --> V1["required checks"]
Evidence --> S2["Frontend (2 files)"]
S2 --> I2["browser runtime and bundle"]
I2 --> R2["Review risk: Frontend (2 files)"]
R2 --> V2["frontend tests"]
OpenCode Review Overview
Pull request overviewOpenCode cannot approve yet because required coverage evidence did not pass. Review outcome1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
Coverage evidenceCoverage evidence job did not run or did not publish coverage evidence. Changed-File Evidence Mapflowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file: bolt.md"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file: bolt.md"]
R1 --> V1["required checks"]
Evidence --> S2["Frontend (2 files)"]
S2 --> I2["browser runtime and bundle"]
I2 --> R2["Review risk: Frontend (2 files)"]
R2 --> V2["frontend tests"]
|
- App.tsx의 visibleNodes에서 노드 드래그(60fps) 시 불필요한 node.data 객체 할당을 방지하고 React.memo 참조를 유지하도록 WeakMap 캐시 적용. - search.ts의 findSearchMatchedNodeIds 검색 로직에도 node.data 기반의 WeakMap 캐시를 도입하여 드래그 중 O(N*C) 탐색 재실행 방지. - cardinalityColumns 의존성 배열을 객체 참조(cardinalityNode)에서 데이터 참조(cardinalityNode?.data)로 변경하여 렌더링 최적화.
There was a problem hiding this comment.
Pull request overview
OpenCode cannot approve yet because required coverage evidence did not pass.
Review outcome
1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
-
Problem: The required coverage-evidence job result was
failure, so OpenCode cannot establish approval sufficiency for this head. -
Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.
-
Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present. -
Result: REQUEST_CHANGES
-
Reason: coverage-evidence result was
failure, so required test/docstring evidence was not proven for current head402f2b0713458d4f334e49a616f1b61c5c36702c. -
Head SHA:
402f2b0713458d4f334e49a616f1b61c5c36702c -
Workflow run: 29453741368
-
Workflow attempt: 1
Coverage evidence
Coverage evidence job did not run or did not publish coverage evidence.
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file: bolt.md"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file: bolt.md"]
R1 --> V1["required checks"]
Evidence --> S2["Frontend (2 files)"]
S2 --> I2["browser runtime and bundle"]
I2 --> R2["Review risk: Frontend (2 files)"]
R2 --> V2["frontend tests"]
- App.tsx의 visibleNodes에서 노드 드래그(60fps) 시 불필요한 node.data 객체 할당을 방지하고 React.memo 참조를 유지하도록 WeakMap 캐시 적용. - search.ts의 findSearchMatchedNodeIds 검색 로직에도 node.data 기반의 WeakMap 캐시를 도입하여 드래그 중 O(N*C) 탐색 재실행 방지. - cardinalityColumns 의존성 배열을 객체 참조(cardinalityNode)에서 데이터 참조(cardinalityNode?.data)로 변경하여 렌더링 최적화. - CI 빌드 오류 해결을 위해 packageManager 명시 (pnpm@10.30.3)
- App.tsx의 visibleNodes에서 노드 드래그(60fps) 시 불필요한 node.data 객체 할당을 방지하고 React.memo 참조를 유지하도록 WeakMap 캐시 적용. - search.ts의 findSearchMatchedNodeIds 검색 로직에도 node.data 기반의 WeakMap 캐시를 도입하여 드래그 중 O(N*C) 탐색 재실행 방지. - cardinalityColumns 의존성 배열을 객체 참조(cardinalityNode)에서 데이터 참조(cardinalityNode?.data)로 변경하여 렌더링 최적화.
There was a problem hiding this comment.
Pull request overview
OpenCode cannot approve yet because required coverage evidence did not pass.
Review outcome
1. HIGH .github/workflows/opencode-review.yml:1 - Coverage evidence did not prove required test/docstring evidence
-
Problem: The required coverage-evidence job result was
failure, so OpenCode cannot establish approval sufficiency for this head. -
Root cause: Automated approval is only valid when the same-head coverage-evidence job proves supported repository test suites passed and configured docstring gates passed or were advisory, or reports not applicable because no supported source files or package manifests exist. Missing, failed, skipped, unavailable, or unsupported-tooling test evidence is a blocker.
-
Fix: Install or configure the repository test/docstring evidence tooling when source files or package manifests exist, rerun the current-head coverage-evidence job, and approve only after it reports
successwith required evidence or explicit no-source not-applicable evidence. -
Regression test: Keep the approval branch checking
needs.coverage-evidence.result == successbefore posting APPROVE, and publish REQUEST_CHANGES when coverage-evidence blocker states such as cancelled, skipped, failed, unsupported-tooling, or below-100 evidence are present. -
Result: REQUEST_CHANGES
-
Reason: coverage-evidence result was
failure, so required test/docstring evidence was not proven for current head320645b1bd403f0801e164e14686df7a787c30fb. -
Head SHA:
320645b1bd403f0801e164e14686df7a787c30fb -
Workflow run: 29456615449
-
Workflow attempt: 1
Coverage evidence
Coverage evidence job did not run or did not publish coverage evidence.
Changed-File Evidence Map
flowchart LR
PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
Evidence --> S1["Changed file: bolt.md"]
S1 --> I1["repository behavior"]
I1 --> R1["Review risk: Changed file: bolt.md"]
R1 --> V1["required checks"]
Evidence --> S2["Frontend (2 files)"]
S2 --> I2["browser runtime and bundle"]
I2 --> R2["Review risk: Frontend (2 files)"]
R2 --> V2["frontend tests"]
💡 What: React Flow에서 노드 드래그 시 발생하는 과도한 리렌더링 및 검색 함수 재연산을 방지하기 위해
WeakMap기반 캐싱을 구현했습니다.🎯 Why: ERD 검색 필터가 활성화된 상태에서 노드를 드래그할 때
nodes상태가 60fps로 업데이트되면서visibleNodes가 모든 노드에 대해 새로운data객체를 생성합니다. 이로 인해TableNode의React.memo(prev.data === next.data) 얕은 비교가 깨져 전체 그래프가 깊은 리렌더링(O(N))되며 렌더링 성능이 심각하게 저하되는 문제를 해결합니다.📊 Impact:
🔬 Measurement: 검색창에 검색어를 입력한 후 여러 개의 테이블이 있는 ERD에서 특정 노드를 드래그하여 브라우저 프로파일러 상의 렌더링 비용(ms/frame) 개선을 확인할 수 있습니다.
PR created automatically by Jules for task 7465768872023339896 started by @seonghobae