Skip to content

fix(windows): reduce native host and Desktop idle polling - #1450

Draft
lucha0404 wants to merge 2 commits into
yyjeqhc:mainfrom
lucha0404:fix/windows-idle-probes-upstream-20261127
Draft

lucha0404 wants to merge 2 commits into
yyjeqhc:mainfrom
lucha0404:fix/windows-idle-probes-upstream-20261127

Conversation

@lucha0404

Copy link
Copy Markdown
Contributor

Problem

Windows can spend CPU on process observations while the browser bridge and Desktop are idle: the native host repeatedly takes a whole-process snapshot to check its parent, and automatic Desktop refreshes repeatedly perform a full runtime observation.

Changes

  • Resolve the native host's parent once, validate process creation time, and retain an owned process handle for liveness checks. Parent exit and failed checks close the connection; Unix parent semantics remain unchanged.
  • Share a 30-second budget for automatic full runtime observations across the renderer and native tray. Explicit refresh remains fresh, with environment, runtime selection, operation generation, and concurrent request boundaries preserved.

This is a follow-up to #1447. The earlier native-peer socket fix (f60cb41) is already merged there and is not included again. This draft contains only the two follow-up commits, cherry-picked without conflicts onto upstream main f9797dedeb6614cd5255ab1a5ad76d26edca9ae2.

Validation and provenance

Historical validation was performed on the original fix branch, before these cherry-picks:

Original source commit Recorded validation
26047cf30cd2babe5521da317f06b6dd7f69627e Regression failed before the fix and passed afterward; browser crate suite: 147 passed, 25 ignored. The three real Windows parent-lifecycle regressions were also run explicitly and passed.
7fb5463108cb802dbeaa32e557c4493320c3972d 12 focused Desktop Rust tests passed; 829 frontend tests in 38 files passed; frontend typecheck and form-control CSS contract passed.

For this draft head, c39f6b61f8609bad979f33f9079fbdccb91383cf, all 10 changed files have canonical Git blob IDs identical to the corresponding files at the original 7fb5463 source, including canonicalized working-tree content. The two patches are equivalent to their source commits, and git diff --check passed.

No tests or builds were rerun locally on this new base/head. The historical results above are source-change evidence, not new-base integration results. Integration validation is pending PR CI and review; this PR remains a draft.

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.

1 participant