Skip to content

Extension causes high cpu load #70

Closed

Description

@chuccv
  • Issue Type: Performance
  • Extension Name: claude-code-usage
  • Extension Version: 2.2.0
  • OS Version: Linux x64 6.8.0-134-generic
  • VS Code version: 1.127.0

⚠️ Make sure to attach this file from your home-directory:
⚠️file:///tmp/GrowthJack.claude-code-usage-unresponsive.cpuprofile.txt

Find more details here: https://github.com/microsoft/vscode/wiki/Explain-extension-causes-high-cpu-load

Activity

  1. Carl723000 commented on Jul 12, 2026

    @Carl723000
    Collaborator

    Thanks for the report. To locate the hot path we need the profile the VS Code prompt mentions. Could you attach:

    1. the .cpuprofile.txt from the "unresponsive extension" prompt,
    2. the extension's diagnostic log (Command Palette → Claude Code Usage: Show Diagnostic Logs), and
    3. the rough size of ~/.claude/projects (session count / total MB)?

    A likely factor on Linux is the recursive fs.watch plus a full re-parse of the log corpus on each refresh during active logging. Meanwhile you can reduce the load via the Live-refresh delay setting (raise it, or set it to Off) and enableContentAnalysis: false.


    🤖 Generated with Claude Code

  2. Carl723000 commented on Jul 18, 2026

    @Carl723000
    Collaborator

    V2.2.1 now has a release candidate in #78 for this issue. It removes the hidden 8-second active polling override, adds 60/120/300-second file-watch quiet delays, bounds first-timestamp scanning, reuses one manifest per refresh, and emits anonymous stage timings.

    Please test V2.2.1 on the same Linux setup after it is published, with Live refresh delay at 2 seconds and Refresh interval at both 60 and 300 seconds. Run Claude Code continuously for about 10 minutes while observing Extension Host CPU, then use Claude Code Usage: Show Diagnostic Logs and attach only the refresh: lines. Those lines contain numeric counts and timings only—no prompts, paths, session IDs, credentials, or raw JSONL.

    We will keep #70 open until the Linux result is confirmed. If CPU remains high, the next useful artifact is an Extension Host CPU profile plus the anonymous refresh: lines.


    🤖 Generated with OpenAI Codex

  3. Carl723000 commented on Aug 1, 2026

    @Carl723000
    Collaborator

    The additional energy fix has now been merged in #83 and is scheduled for v2.2.2.

    Compared with v2.2.1, it stops recurring polling, file watching, credential watching, and Claude project-tree inspection while the VS Code window is in the background. Returning to the foreground performs one immediate catch-up refresh. It also adds longer quiet delays without making manual refresh unavailable.

    We will keep this issue open for the original Linux reporter's confirmation. After v2.2.2 is published, please repeat the same 10-minute Extension Host CPU check and attach the anonymous refresh: lines if the load remains high.


    🤖 Generated with OpenAI Codex

  4. Carl723000 commented on Aug 20, 2026

    @Carl723000
    Collaborator

    Thanks again for reporting this and helping us isolate the Linux CPU problem.

    The refresh-frequency and background-work problems tracked by this issue were addressed across v2.2.1 and v2.2.2: the hidden active polling override was removed, longer quiet delays were added, initial scanning was bounded, and recurring work is suspended while the VS Code window is inactive. The evidence reported in #87 indicates that these controls are working as intended.

    The remaining problem has a different root cause: a single changed file can still make one refresh re-read and re-aggregate the complete corpus. That work is now tracked separately in #87.

    I am therefore closing this issue as fixed for its original scope. Please follow #87 for the single-refresh-cost fix, or comment again if the original recurring/background behaviour still occurs on the current release.


    🤖 Generated with OpenAI Codex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions