Skip to content

⚡ Bolt: [성능 개선] 핸들 ID 생성 시 가비지 컬렉션 오버헤드 감소 - #703

Closed
seonghobae wants to merge 1 commit into
mainfrom
bolt-performance-improvement-4123702365428862387
Closed

⚡ Bolt: [성능 개선] 핸들 ID 생성 시 가비지 컬렉션 오버헤드 감소#703
seonghobae wants to merge 1 commit into
mainfrom
bolt-performance-improvement-4123702365428862387

Conversation

@seonghobae

@seonghobae seonghobae commented Aug 2, 2026

Copy link
Copy Markdown
Collaborator

💡 What: sanitizeHandleId 함수에서 Array.from 대신 for...of 루프를 사용하도록 수정했습니다.
🎯 Why: 노드/엣지의 핸들 ID를 생성하는 등 빈번하게 발생하는 문자열 연산에서 Array.from을 사용하면 불필요한 중간 배열이 생성되어 가비지 컬렉션(GC) 오버헤드가 증가하기 때문입니다.
📊 Impact: 핸들 ID 생성 시 발생하는 메모리 할당과 GC 압박을 줄여 애플리케이션의 렌더링 성능 및 메모리 효율성을 향상시킵니다.
🔬 Measurement: 수많은 테이블 노드나 컬럼이 있는 대규모 스키마에서 메모리 프로파일링을 통해 메모리 할당량 및 GC 수행 횟수의 감소를 확인할 수 있습니다.


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

Summary by CodeRabbit

  • 개선 사항

    • 핸들 ID 정리 처리의 성능과 효율성을 개선했습니다.
    • 기존 문자 인코딩 및 빈 문자열 처리 결과는 동일하게 유지됩니다.
  • 문서

    • 고빈도 문자열 처리 시 더 효율적인 반복 방식을 사용하도록 개발 가이드를 보완했습니다.

💡 What: `sanitizeHandleId` 함수에서 `Array.from` 대신 `for...of` 루프를 사용하도록 수정했습니다.
🎯 Why: 노드/엣지의 핸들 ID를 생성하는 등 빈번하게 발생하는 문자열 연산에서 `Array.from`을 사용하면 불필요한 중간 배열이 생성되어 가비지 컬렉션(GC) 오버헤드가 증가하기 때문입니다.
📊 Impact: 핸들 ID 생성 시 발생하는 메모리 할당과 GC 압박을 줄여 애플리케이션의 렌더링 성능 및 메모리 효율성을 향상시킵니다.
🔬 Measurement: 수많은 테이블 노드나 컬럼이 있는 대규모 스키마에서 메모리 프로파일링을 통해 메모리 할당량 및 GC 수행 횟수의 감소를 확인할 수 있습니다.
@google-labs-jules

Copy link
Copy Markdown

👋 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 2, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

sanitizeHandleId가 중간 배열 없이 for...of로 문자열을 처리하도록 변경되었습니다. 문자 사이의 구분자와 16진수 인코딩 동작은 유지됩니다. 반복 기반 문자열 처리 지침도 추가되었습니다.

Changes

문자열 처리 최적화

Layer / File(s) Summary
sanitizeHandleId 직접 문자열 구성
frontend/src/erd/handleUtils.ts, .jules/bolt.md
sanitizeHandleIdArray.from(...).join('-') 대신 for...of로 결과 문자열을 구성합니다. 반복 기반 문자열 처리 지침이 추가되었습니다.

Estimated code review effort: 2 (Simple) | ~10 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 sanitizeHandleId의 성능 개선과 가비지 컬렉션 오버헤드 감소라는 주요 변경 사항을 명확하게 설명합니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch bolt-performance-improvement-4123702365428862387

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

@coderabbitai coderabbitai 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.

🧹 Nitpick comments (1)
.jules/bolt.md (1)

80-82: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

최적화 근거에 학술 문헌을 추가하세요.

이 PR을 실질적인 기능 변경으로 분류한다면, Array.from(string)과 반복 기반 처리의 할당 및 GC 비용을 뒷받침하는 논문 또는 기술 자료를 PR 설명이나 이 문서에 추가하세요. 출처의 인용, 링크, 요약을 포함해야 합니다.

As per coding guidelines, 실질적인 기능 또는 프로세스 PR은 관련 학술 문헌으로 근거를 제시해야 합니다.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.jules/bolt.md around lines 80 - 82, 문서의 “String Iteration Performance in
Frontend” 학습 항목에 할당 및 GC 비용 최적화를 뒷받침하는 관련 학술 논문 또는 기술 자료를 추가하세요. 각 출처에는 인용, 링크,
그리고 해당 자료가 Array.from(string)과 for...of 또는 직접 문자열 반복의 메모리 할당·GC 차이를 어떻게 뒷받침하는지에
대한 간단한 요약을 포함하세요.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Nitpick comments:
In @.jules/bolt.md:
- Around line 80-82: 문서의 “String Iteration Performance in Frontend” 학습 항목에 할당 및
GC 비용 최적화를 뒷받침하는 관련 학술 논문 또는 기술 자료를 추가하세요. 각 출처에는 인용, 링크, 그리고 해당 자료가
Array.from(string)과 for...of 또는 직접 문자열 반복의 메모리 할당·GC 차이를 어떻게 뒷받침하는지에 대한 간단한 요약을
포함하세요.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5e0d24b8-6ad1-472e-a5df-6bbe55b58615

📥 Commits

Reviewing files that changed from the base of the PR and between 5b7d8d6 and edb0a24.

📒 Files selected for processing (2)
  • .jules/bolt.md
  • frontend/src/erd/handleUtils.ts

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before 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 head edb0a24db85eaec4b822091603a3b5c34c26611d.

  • Head SHA: edb0a24db85eaec4b822091603a3b5c34c26611d

  • Workflow run: 30764474959

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 2

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: handleUtils.ts"]
  S2 --> I2["browser runtime and bundle"]
  I2 --> R2["Review risk: Frontend: handleUtils.ts"]
  R2 --> V2["frontend tests"]
Loading

@opencode-agent

opencode-agent Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: edb0a24db85eaec4b822091603a3b5c34c26611d
  • Workflow run: 30764474959
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

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 success with required evidence or explicit no-source not-applicable evidence.

  • Regression test: Keep the approval branch checking needs.coverage-evidence.result == success before 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 head edb0a24db85eaec4b822091603a3b5c34c26611d.

  • Head SHA: edb0a24db85eaec4b822091603a3b5c34c26611d

  • Workflow run: 30764474959

  • Workflow attempt: 1

Coverage evidence

Coverage Decision

  • Result: FAIL
  • Test evidence: not proven passing
  • Docstring evidence: not proven passing when configured
  • Failure count: 2

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: handleUtils.ts"]
  S2 --> I2["browser runtime and bundle"]
  I2 --> R2["Review risk: Frontend: handleUtils.ts"]
  R2 --> V2["frontend tests"]
Loading

Copy link
Copy Markdown
Collaborator Author

Closing as superseded by #700. The canonical PR includes this same Unicode-safe allocation reduction in sanitizeHandleId, plus the related handle-decoding/export work and stricter regression tests. Keeping a single branch prevents duplicate conflicts.

@seonghobae seonghobae closed this Aug 3, 2026
@google-labs-jules

Copy link
Copy Markdown

Closing as superseded by #700. The canonical PR includes this same Unicode-safe allocation reduction in sanitizeHandleId, plus the related handle-decoding/export work and stricter regression tests. Keeping a single branch prevents duplicate conflicts.

Understood. Acknowledging that this work is now obsolete and 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