GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [Desktop] ResizeObserver loop causes high CPU usage (renderer process) · Issue #34289 · anomalyco/opencode

[Desktop] ResizeObserver loop causes high CPU usage (renderer process) #34289

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
[Desktop] ResizeObserver loop causes high CPU usage (renderer process)#34289
Copy link
Assignees
Hona

Description

@HEXUXIU
HEXUXIU
opened on Jun 28, 2026
Issue body actions

描述

OpenCode 桌面版 v1.17.9 / v1.17.11 的 renderer 进程因 ResizeObserver loop completed with undelivered notifications. 错误持续触发,导致 CPU 占用飙升(renderer + GPU + node service 合计 ~200s CPU / 2分钟)。

复现步骤

  1. 打开 OpenCode 桌面版
  2. 正常使用一段时间
  3. 观察 CPU 占用或查看 renderer.log

影响

  • Renderer 进程 CPU 占用 ~81s(2分钟内)
  • GPU 进程 CPU 占用 ~58s
  • Node service CPU 占用 ~58s
  • 总 CPU 负载飙升至 91%

根因

UI 组件中的 ResizeObserver 回调触发了 layout 变化,导致再次触发 resize,形成无限循环。浏览器抛出 ResizeObserver loop completed with undelivered notifications。

虽然代码中(main-D_cwiNV1.js:6176)已通过正则过滤了该错误的 Sentry 上报,但没有解决根本问题。

临时修复方案

在 renderer 的 index.html 中注入
o-patch.js,用
equestAnimationFrame 对 ResizeObserver 回调做防抖:

js window.ResizeObserver = function PatchedResizeObserver(callback) { var rafId = null; var wrapped = function(entries, observer) { if (rafId !== null) return; rafId = requestAnimationFrame(function() { rafId = null; callback(entries, observer); }); }; return new OrigResizeObserver(wrapped); };

环境

  • OpenCode 版本: 1.17.9 / 1.17.11
  • 平台: Windows (Electron 42.3.3)

Activity

  1. github-actions
    assigned
    Hona
    on Jun 28, 2026
  2. github-actions commented on Jun 28, 2026

    @github-actions
    github-actionsBot
    on Jun 28, 2026 – with GitHub Actions
    Contributor
    More actions

    This issue might be a duplicate of existing issues. Please check:

    • [Bug]: Desktop renderer crashes from ResizeObserver feedback loop on rapid chat-list updates #33712: Same ResizeObserver feedback loop crash in the desktop renderer on v1.17.9 (Electron 42.3.3, Windows) — identical error message and affected component
  3. github-actions commented on Aug 28, 2026

    @github-actions
    github-actionsBot
    on Aug 28, 2026 – with GitHub Actions
    Contributor
    More actions

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

  4. github-actions
    closed this as not plannedon Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @Hona
    Hona

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    You are visitor 01402775 — GeezerVison does not store the pages you look up.
    Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.