Skip to content

[Perf] chat: avoid transferring local debug logs over IPC - #331735

Merged
roblourens merged 1 commit into
mainfrom
roblou/agent-host-log-resource-export
Aug 20, 2026
Merged

[Perf] chat: avoid transferring local debug logs over IPC#331735
roblourens merged 1 commit into
mainfrom
roblou/agent-host-log-resource-export

Conversation

@roblourens

Copy link
Copy Markdown
Member

Follow-up to #331665.

What changed

  • keep local rotated logs and local user-data sidecars as URI/size descriptors
  • let the main process stream those files directly into the ZIP instead of transferring renderer strings
  • cap unavoidable inline content for non-local resources to a shared 30 MiB budget
  • avoid falling back to full output-model contents when source-backed collection fails

Why

A fully rotated renderer/shared log setup can retain and serialize tens of MiB in the renderer before the native ZIP size check runs. Passing local resources avoids the renderer and IPC memory amplification while preserving inline support for genuinely non-local resources.

Validation

  • npm run transpile-client
  • ./scripts/test.sh --run src/vs/workbench/contrib/chat/test/browser/exportAgentHostDebugLogs.test.ts (8 passing)
  • pre-commit hygiene

(Written by Copilot)

Keep local log and user-data resources as URI/size descriptors so the main process can stream them directly into the export. Bound unavoidable inline content for non-local resources to a shared 30 MiB budget.\n\n(Written by Copilot)\n\nCo-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings August 20, 2026 00:25

Copilot AI 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

Moves local debug-log packaging out of the renderer to reduce IPC and memory overhead.

Changes:

  • Represents local logs as URI/size descriptors.
  • Streams local files directly into native ZIP output.
  • Caps non-local inline log content at 30 MiB.
Show a summary per file
File Description
exportAgentHostDebugLogs.test.ts Tests local descriptors and inline limits.
exportAgentHostDebugLogsService.ts Converts local descriptors for native ZIP streaming.
exportAgentHostDebugLogsAction.ts Collects descriptors and enforces the shared inline budget.

Review details

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

  • Files reviewed: 3/3 changed files
  • Comments generated: 1
  • Review effort level: Balanced

@roblourens
roblourens marked this pull request as ready for review August 20, 2026 01:28
@roblourens
roblourens enabled auto-merge (squash) August 20, 2026 01:28
@roblourens
roblourens merged commit 4f34cd7 into main Aug 20, 2026
45 of 46 checks passed
@roblourens
roblourens deleted the roblou/agent-host-log-resource-export branch August 20, 2026 02:08
@vs-code-engineering vs-code-engineering Bot added this to the 1.135.0 milestone Aug 20, 2026
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.

3 participants