Skip to content

⚡ Bolt: 중간 배열 할당 및 다중 O(N) 탐색 최적화 - #1499

Closed
seonghobae wants to merge 5 commits into
developfrom
bolt-perf-array-iteration-3271588678792497075
Closed

seonghobae wants to merge 5 commits into
developfrom
bolt-perf-array-iteration-3271588678792497075

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

이 PR은 프론트엔드의 성능을 개선하기 위해 불필요한 배열 할당과 반복 탐색을 O(1) 순회로 최적화합니다.

💡 작업 내용:

  1. NetworkGraph.tsxuseMemo에서 Map 값을 배열로 변환한 뒤 .slice()를 호출하는 방식을 단일 for...of 순회로 변경하여 O(N) 중간 배열 할당을 제거했습니다.
  2. project-trace-readiness.ts에서 특정 키를 찾기 위해 .find()를 여러 번 호출하던 로직을 단일 for...of 루프로 병합하여 O(N) 다중 순회를 제거했습니다.

🎯 목적:
대용량 데이터 집합에서 파생 데이터를 계산할 때 불필요한 중간 배열 객체가 할당되어 가비지 컬렉터 부하가 증가하고 렌더링 스레드를 블로킹하는 성능 병목을 예방하기 위함입니다.

📊 예상 영향:

  • 네트워크 그래프의 노드/간선 Map이 커질 때 드롭다운 옵션을 생성하는 과정에서의 메모리 할당량 및 시간 복잡도를 O(N)에서 O(1) 상수로 감소시킵니다.
  • project-trace-readiness 지표 계산 시 다중 배열 순회가 단일 순회로 최적화됩니다.

🔬 확인 방법:

  • pnpm run test runpnpm run lint 통과 확인 완료.

PR created automatically by Jules for task 3271588678792497075 started by @seonghobae


Devin Review

- Replace `Array.from().slice().map()` in NetworkGraph.tsx with a bounded loop to avoid O(N) intermediate array allocations
- Replace multiple `domains.find()` calls in project-trace-readiness.ts with a single loop traversal
- Improve runtime performance and reduce garbage collection overhead
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 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 @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@coderabbitai

coderabbitai Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

Next included review available in 53 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Learn how review limits work.

Review configuration:

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Team

Run ID: fbcf1341-743f-439a-a53c-b81aebe1fd10

📥 Commits

Reviewing files that changed from the base of the PR and between 042b0c7 and 7db0542.

📒 Files selected for processing (3)
  • .jules/bolt.md
  • frontend/src/components/NetworkGraph.tsx
  • frontend/src/components/project-trace-readiness.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Devin Review found 2 potential issues.

Devin Review

Comment thread frontend/src/components/NetworkGraph.tsx Outdated
Comment thread frontend/src/components/project-trace-readiness.ts Outdated
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

PR governance metadata gate is not ready for 7db054297bb3aec090a34792f4f510d980f74b35:

  • Required check strix is CANCELLED on the current head.

- Replace `Array.from().slice().map()` in NetworkGraph.tsx with a bounded loop to avoid O(N) intermediate array allocations
- Replace multiple `domains.find()` calls in project-trace-readiness.ts with a single loop traversal
- Improve runtime performance and reduce garbage collection overhead
- Replace `Array.from().slice().map()` in NetworkGraph.tsx with a bounded loop to avoid O(N) intermediate array allocations
- Replace multiple `domains.find()` calls in project-trace-readiness.ts with a single loop traversal
- Improve runtime performance and reduce garbage collection overhead
- Replace `Array.from().slice().map()` in NetworkGraph.tsx with a bounded loop to avoid O(N) intermediate array allocations
- Replace multiple `domains.find()` calls in project-trace-readiness.ts with a single loop traversal
- Improve runtime performance and reduce garbage collection overhead
- Replace `Array.from().slice().map()` in NetworkGraph.tsx with a bounded loop to avoid O(N) intermediate array allocations
- Replace multiple `domains.find()` calls in project-trace-readiness.ts with a single loop traversal
- Improve runtime performance and reduce garbage collection overhead

Copy link
Copy Markdown
Contributor Author

현재 head와 실제 collection cardinality를 다시 검증했습니다. 이 PR은 두 종류의 변경을 섞고 있는데, 유지할 유효 delta는 남지 않습니다.

  1. NetworkGraph.tsx의 bounded Map iteration은 current-base successor #1522가 동일 production 계약을 완전 승계하고, 5/5/8 조기 종료 회귀 테스트와 CHANGELOG까지 추가로 보존합니다.
  2. project-trace-readiness.ts의 별도 변경은 성능 결함으로 성립하지 않습니다. buildAutomationBrief()domains는 코드에 고정된 정확히 5개 항목이고, buildProjectControlReadinessLayer()items도 정확히 5개입니다. 기존 2회/3회 .find()는 입력 데이터 규모와 함께 커지는 hot-path 탐색이 아니며, 새 루프 역시 같은 5개 고정 배열을 순회합니다. PR 본문의 “대용량 데이터에서 O(N)→O(1)” 주장은 이 경로에는 적용되지 않고, k6/프로파일/렌더링 acceptance나 회귀 테스트도 이 고정-cardinality rewrite의 buyer-visible 개선을 입증하지 않습니다. 오히려 조건 분기와 생성 메타 주석만 늘립니다.

.jules/bolt.md는 제품/runtime/test/fixture contract가 아닙니다. 따라서 NetworkGraph 유효 delta는 #1522로 완전 승계됐고, 나머지 고유 delta는 검증된 성능 개선이 아니므로 이 혼합 predecessor lane을 정리합니다. #1522의 exact-head CI/security/review는 별도 충족해야 하며 이 PR의 evidence는 이전하지 않습니다.

@google-labs-jules

Copy link
Copy Markdown
Contributor

현재 head와 실제 collection cardinality를 다시 검증했습니다. 이 PR은 두 종류의 변경을 섞고 있는데, 유지할 유효 delta는 남지 않습니다.

  1. NetworkGraph.tsx의 bounded Map iteration은 current-base successor #1522가 동일 production 계약을 완전 승계하고, 5/5/8 조기 종료 회귀 테스트와 CHANGELOG까지 추가로 보존합니다.
  2. project-trace-readiness.ts의 별도 변경은 성능 결함으로 성립하지 않습니다. buildAutomationBrief()domains는 코드에 고정된 정확히 5개 항목이고, buildProjectControlReadinessLayer()items도 정확히 5개입니다. 기존 2회/3회 .find()는 입력 데이터 규모와 함께 커지는 hot-path 탐색이 아니며, 새 루프 역시 같은 5개 고정 배열을 순회합니다. PR 본문의 “대용량 데이터에서 O(N)→O(1)” 주장은 이 경로에는 적용되지 않고, k6/프로파일/렌더링 acceptance나 회귀 테스트도 이 고정-cardinality rewrite의 buyer-visible 개선을 입증하지 않습니다. 오히려 조건 분기와 생성 메타 주석만 늘립니다.

.jules/bolt.md는 제품/runtime/test/fixture contract가 아닙니다. 따라서 NetworkGraph 유효 delta는 #1522로 완전 승계됐고, 나머지 고유 delta는 검증된 성능 개선이 아니므로 이 혼합 predecessor lane을 정리합니다. #1522의 exact-head CI/security/review는 별도 충족해야 하며 이 PR의 evidence는 이전하지 않습니다.

Understood. Acknowledging that this work is now obsolete as the valid changes to NetworkGraph.tsx are superseded by #1522, and the changes to project-trace-readiness.ts are not valid performance improvements due to the fixed cardinality. I am stopping work on this task.

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