Skip to content

⚡ Bolt: [성능 최적화] 대형 HTML 템플릿의 문자열 치환 체이닝 제거#169

Open
seonghobae wants to merge 4 commits into
mainfrom
bolt/html-template-optimization-13587827729480266836
Open

⚡ Bolt: [성능 최적화] 대형 HTML 템플릿의 문자열 치환 체이닝 제거#169
seonghobae wants to merge 4 commits into
mainfrom
bolt/html-template-optimization-13587827729480266836

Conversation

@seonghobae

Copy link
Copy Markdown
Collaborator

💡 What: ViewerUiController.java에서 HTML 뷰어 쉘을 반환할 때 사용하던 .replace() 문자열 체이닝을 사전에 분할된 private static final String 조각들과 문자열 연결 연산자(+)를 사용하는 방식으로 개선했습니다.

🎯 Why: 기존 방식은 크기가 큰 HTML 템플릿에 여러 번 .replace()를 호출하면서, 매 호출마다 불필요하게 거대한 String과 내부 char[] 인스턴스를 계속해서 할당하여 메모리와 가비지 컬렉터(GC)에 부담을 주고 있었습니다.

📊 Impact: 불필요한 객체 생성이 원천 차단되며, 컴파일 시 StringBuilder 패턴(또는 Java의 StringConcatFactory)으로 자동 최적화되어 한 번의 할당으로 HTML을 구성하므로 응답 속도 및 메모리 사용량이 개선됩니다.

🔬 Measurement: ViewerUiControllerTest 테스트가 정상 통과함을 확인했고, Checkstyle 및 100% 테스트 커버리지를 만족합니다.


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

- ViewerUiController.java의 HTML 렌더링 부분에서 `.replace()` 체이닝으로 인한 과도한 String 및 char[] 객체 할당을 방지하기 위해 템플릿을 분할하여 `+`로 이어붙이도록 변경했습니다.
@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.

- ViewerUiController.java의 HTML 렌더링 부분에서 `.replace()` 체이닝으로 인한 과도한 String 및 char[] 객체 할당을 방지하기 위해 템플릿을 분할하여 `+`로 이어붙이도록 변경했습니다.
- ViewerUiController.java의 HTML 렌더링 부분에서 `.replace()` 체이닝으로 인한 과도한 String 및 char[] 객체 할당을 방지하기 위해 템플릿을 분할하여 `+`로 이어붙이도록 변경했습니다.
- ViewerUiController.java의 HTML 렌더링 부분에서 `.replace()` 체이닝으로 인한 과도한 String 및 char[] 객체 할당을 방지하기 위해 템플릿을 분할하여 `+`로 이어붙이도록 변경했습니다.

@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 could not approve from deterministic current-head evidence because GitHub Checks have failed.

Findings

1. HIGH Current-head GitHub Checks - Fix failed required checks before approval

  • Problem: Failed same-head checks remain for d5b3d7e324a47e85c018fe3a0acb1b19f9539bb5.
  • Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
  • Fix: Read and fix the failed check logs below, then rerun the current-head checks.
  • Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.

Failed checks:

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (2 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (2 files)"]
  R1 --> V1["required checks"]
Loading

@opencode-agent

Copy link
Copy Markdown
Contributor

OpenCode Review Overview

  • Head SHA: d5b3d7e324a47e85c018fe3a0acb1b19f9539bb5
  • Workflow run: 29764087420
  • Workflow attempt: 1
  • Gate result: REQUEST_CHANGES (approval step)

Pull request overview

OpenCode could not approve from deterministic current-head evidence because GitHub Checks have failed.

Findings

1. HIGH Current-head GitHub Checks - Fix failed required checks before approval

  • Problem: Failed same-head checks remain for d5b3d7e324a47e85c018fe3a0acb1b19f9539bb5.
  • Root cause: The model-unavailable evidence fallback is allowed only when peer GitHub Checks are complete and clean.
  • Fix: Read and fix the failed check logs below, then rerun the current-head checks.
  • Regression test: Keep the model-unavailable fallback gated on an empty failed-check rollup.

Failed checks:

Changed-File Evidence Map

flowchart LR
  PR["PR changed files"] --> Evidence["OpenCode bounded evidence"]
  Evidence --> S1["Changed file (2 files)"]
  S1 --> I1["repository behavior"]
  I1 --> R1["Review risk: Changed file (2 files)"]
  R1 --> V1["required checks"]
Loading

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