Skip to content

Renderer unresponsive (6-7s freeze) in execEditLength when computing large file diffs #32853

@Domovikx

Description

@Domovikx

Description

Description:
Renderer becomes unresponsive for 6-7 seconds when computing file diffs in a session with large files. The hang occurs in the diff algorithm (execEditLength → structuredPatch → createTwoFilesPatch → resolveFileDiff) triggered by CollapsibleRoot components rendering file diffs.

Two consecutive sessions crashed the same way (17:18 and 17:35). The renderer recovered on its own each time (~6s), but the app is unusable during the freeze.

Full debug logs attached.

OpenCode version:
1.17.8 (packaged, win32 x64)

Steps to reproduce:

  1. Open a session that contains a file diff with many changes or a very large file
  2. The CollapsibleRoot component tries to compute structuredPatch → execEditLength
  3. The O(n*m) diff algorithm blocks the main thread for 6+ seconds
  4. Electron marks the window as "renderer unresponsive"

Operating System:
Windows 11

Terminal:
Windows Terminal

Plugins

OpenCode version

1.17.8 (packaged, win32 x64)

Steps to reproduce

  1. Open a session that contains a file diff with many changes or a very large file
  2. The CollapsibleRoot component tries to compute structuredPatch → execEditLength
  3. The O(n*m) diff algorithm blocks the main thread for 6+ seconds
  4. Electron marks the window as "renderer unresponsive"

opencode-debug-20260618T143520.zip

Screenshot and/or share link

No response

Operating System

Windows 11

Terminal

Windows Terminal

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions