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 — perf(windows): optimize Windows on ARM performance and native update support by mweinbach · Pull Request #18508 · pingdotgg/t3code

Conversation

@mweinbach

@mweinbach mweinbach commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Problem

On Windows and Windows on ARM (win32-arm64), T3 Code suffers from severe responsiveness bottlenecks, high background CPU/IPC overhead, slow startup, and update/provider issues that push x64 builds onto ARM hosts or fail on ARM64 installations:

  1. Port discovery WMI polling: PortScanner spawns powershell.exe Get-NetTCPConnection + Get-Process every 3 seconds even when no terminals are active, taking up to 22.5s and timing out at 5s on every poll.
  2. Main-thread FFI overhead in @ff-labs/fff-node: Workspace file searches perform 7 separate FFI calls plus manual char-by-char pointer reads per result (175,000+ FFI calls for 25k files), stalling the server event loop for >4s and causing WebSocket ping disconnects.
  3. Synchronous SQLite WAL commits: Sqlite.ts enables journal_mode = WAL with the default synchronous = FULL, invoking FlushFileBuffers() on every EventSink.write transaction on Windows.
  4. Duplicate startup shell environment probes & Android SDK PATH scans: The server re-runs synchronous PowerShell login probes even when the desktop parent already prepared the environment, mergeWindowsEnv leaves colliding Path/PATH keys, and LocalDeviceHost scans every PATH directory before checking %LOCALAPPDATA%\Android\Sdk.
  5. Renderer IPC storm during streaming: SnapShotCoordinator recreates drain whenever activeThreadRef updates, firing desktop:list-pending-snap-shots on every streaming turn update.
  6. Full-system PEB process enumeration in t3-resource-monitor: On Windows, sysinfo::ProcessRefreshKind::everything() reads PEB command lines, memory, and disk I/O for every process on the machine every 2 seconds instead of only tracked PIDs.
  7. Windows terminal teardown hangs & console window flashes: node-pty's conpty_console_list_agent only listens for message and hangs for 5s if the helper exits early, Manager.runKillEscalation sleeps for the full grace period after exit, and detached helper spawns flash console windows.
  8. Windows on ARM updates & provider installs: NsisUpdater checks process.arch ("x64" under Prism emulation) or falls back to the first manifest entry, keeping emulated installs on x64 or pushing x64 updates to ARM hosts; DesktopEnvironment ignores runningUnderArm64Translation on win32; .github/workflows/release.yml falls back to an x64-only latest.yml/nightly.yml if the arm64 manifest is missing; ACP Registry providers lack a windows-aarch64 -> windows-x86_64 Prism fallback; and CodexInstallation can hit GNU tar path parsing or transient Windows file-lock rename failures after validation.

Change

  • PortScanner: Short-circuit in 0ms when targetPids is empty and replace Get-NetTCPConnection PowerShell WMI polling with concurrent netstat.exe -ano -p tcp / tcpv6 calls (~50ms).
  • @ff-labs/fff-node patch: Marshal string fields via DataType.String in a single struct return and skip per-item get_score FFI calls when count > 200, cutting 25k-item queries from 4.16s to ~1.12s.
  • SQLite WAL: Set PRAGMA synchronous = NORMAL; alongside PRAGMA journal_mode = WAL;.
  • Startup & device discovery: Respect shellEnvironmentPrepared: true on win32, run shellEnvironment.installIntoProcess concurrently with electronApp.whenReady, deduplicate Path/PATH keys in mergeWindowsEnv, check standard Android SDK locations before scanning PATH, and skip no-op DeviceService.refreshHosts runs.
  • SnapShotCoordinator: Stabilize drain with a ref so streaming thread state updates do not trigger listPendingSnapShots IPC calls.
  • t3-resource-monitor: Enable two-stage process refresh on Windows (ProcessRefreshKind::nothing().with_cpu() across the system, then everything() only for tracked PIDs) and resolve target-triple binary paths in ResourceMonitorBinary.ts.
  • Terminals & process spawning: Handle exit/error on conpty_console_list_agent in node-pty, race process.onExit against processKillGraceMs in Manager.ts, remove the redundant 1s Windows teardown sleep in OpenCodeRuntime.ts, and pass windowsHide: true on detached spawns.
  • Windows on ARM updates & providers:
    • Preserve runningUnderArm64Translation and hostArch: "arm64" on win32 in DesktopEnvironment.ts so DesktopUpdates disables differential downloads when switching from x64 to arm64.
    • Filter updateInfo.files to hostArch in DesktopUpdates.ts (ignoring manifests that carry no package for hostArch) and add NsisUpdater.filterFilesForArch in patches/[email protected] so ARM64 Windows hosts always select arm64.exe.
    • Order arm64 first when merging Windows update manifests in .github/workflows/release.yml and fail if the arm64 manifest is missing instead of publishing an x64-only manifest.
    • Add the Windows arm64.exe download link to /download and update the architecture warning copy for Windows on ARM.
    • Fall back from windows-aarch64 to windows-x86_64 in AcpRegistrySupport.ts, and use System32\tar.exe plus fs.rename retries and stale .install-* cleanup in CodexInstallation.ts.

Model: Claude 5.5 Opus

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
mweinbach added 10 commits October 12, 2026 00:38
@mweinbach
perf(server): replace PowerShell port polling with netstat and idle skip
d60bfc6
@mweinbach
perf(server): reduce fff-node FFI marshaling overhead on large worksp…
ad05545
…aces
@mweinbach
perf(server): use NORMAL synchronous mode for WAL sqlite databases
210a7c8
@mweinbach
perf(desktop,server): avoid duplicate Windows shell environment probe…
e4c519b
…s on startup
@mweinbach
perf(server): skip redundant Android SDK PATH scans and idle host ref…
c2dcb39
…reshes
@mweinbach
perf(web): stop SnapShotCoordinator from polling pending captures on …
921730c
…every thread update
@mweinbach
perf(resource-monitor): use two-stage process refresh on Windows
bde313c
@mweinbach
fix(server): prevent Windows terminal kill timeouts and console windo…
f45b0f6
…w flashes
@mweinbach
fix(providers): support Windows on ARM in Codex installer and ACP reg…
329d55d
…istry
@mweinbach
fix(desktop): prevent pushing x64 updates to arm64 installs and hosts
093e451
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 12, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-12T05:05:10.353476Z 093e451 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added vouch:unvouched Author is not yet trusted in the VOUCHED list. size:XL 500-999 changed lines (additions + deletions). labels Oct 12, 2026
@juliusmarminge ChatGPT Codex Connector

juliusmarminge commented Oct 12, 2026

Copy link
Copy Markdown
Member

Note

This comment is posted by Julius' dot

Closing because this combines independent fixes: replacing PortScanner polling, reducing file-search FFI calls, and selecting ARM64 update packages each solves a separate problem without needing the others. Please split these into focused PRs under the one-problem rule, with reproduction steps and verification for each. Discuss the separate SQLite synchronous-mode default change with maintainers before including it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@macroscopeapp

macroscopeapp Bot commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Approvability

Verdict: Not approved

Macroscope's review found this PR not approvable — This PR introduces broad Windows-on-ARM runtime, updater, provider, terminal, monitoring, release, and dependency behavior changes across the product. It also changes the SQLite persistence default to synchronous = NORMAL, making the change unsuitable for automatic approval.

You can add or adjust custom eligibility rules. Learn more.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@juliusmarminge juliusmarminge closed this Oct 12, 2026
chatgpt-codex-connector[bot]
chatgpt-codex-connector Bot reviewed Oct 12, 2026
View reviewed changes

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 093e451ce6

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread apps/desktop/scripts/ensure-electron-runtime.mjs
Comment on lines +13 to +17
const hostArch =
hostPlatform === "win32" &&
rawHostArch === "x64" &&
process.env.PROCESSOR_ARCHITEW6432?.toUpperCase() === "ARM64"
? "arm64"

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 12, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Keep Electron aligned with the installed native modules

On an ARM64 Windows machine running an x64 Node toolchain, this changes only the architecture of a repaired Electron runtime: pnpm still treats current as x64 (pnpm-workspace.yaml:334-337), and native modules such as node-pty and ffi-rs are therefore installed or built for x64. If ensureElectronRuntime() repairs a missing or invalid runtime, it now downloads arm64 Electron, which is also used as the backend Node executable by DesktopBackendConfiguration.ts; loading those x64 addons from that process then fails with an architecture mismatch. Either keep the repair on rawHostArch or provision/rebuild every native dependency for arm64 as part of the switch.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread apps/web/src/components/desktop/SnapShotCoordinator.tsx
Comment on lines +229 to +233
useEffect(() => {
if (currentTarget) {
lastTargetRef.current = currentTarget;
}
latestContextRef.current = {

@chatgpt-codex-connector chatgpt-codex-connector Bot Oct 12, 2026

Copy link
Copy Markdown

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Update snapshot routing before passive effects

When navigation commits, the existing bridge listener remains subscribed because its dependencies are now stable, but both lastTargetRef and latestContextRef retain the previous route until this passive effect runs. If a requested or ready desktop IPC event arrives after the new thread commits but before passive effects flush, the capture can be pinned or delivered to the thread the user just left. Update these refs with a layout-synchronous or event-ref primitive while preserving the stable callback identities.

Useful? React with 👍 / 👎.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
This was referenced Oct 12, 2026
perf(server): cut fff-node FFI marshaling overhead on large workspaces #18514
Merged
perf(resource-monitor): use two-stage process refresh on Windows #18518
Closed
fix(server): Windows terminal kill no longer waits on timeouts #18519
Merged
fix(desktop): Windows on ARM installs no longer pull x64 updates #18520
Closed
fix(providers): fall back to windows-x86_64 ACP binaries on Windows on ARM #18521
Merged
perf(server): skip redundant Android SDK PATH scans and idle host refreshes #18522
Closed
fix(server): Windows Codex install uses system tar and retries rename #18523
Merged
perf(server): replace Windows PowerShell port polling with netstat #18524
Merged
fix(web): stop SnapShotCoordinator from polling pending captures on every thread update #18525
Closed
perf(desktop,server): avoid duplicate Windows shell environment probes on startup #18526
Closed
@only21mil only21mil mentioned this pull request Oct 31, 2026
fix(marketing): the download page offers the Windows arm64 installer #28306
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@chatgpt-codex-connector chatgpt-codex-connector[bot] chatgpt-codex-connector[bot] left review comments

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

size:XL 500-999 changed lines (additions + deletions). vouch:unvouched Author is not yet trusted in the VOUCHED list.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@mweinbach @juliusmarminge
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.