perf(startup): overlap desktop loading and defer provider work - #9893
Open
maria-rcks wants to merge 7 commits into
Open
perf(startup): overlap desktop loading and defer provider work#9893maria-rcks wants to merge 7 commits into
maria-rcks wants to merge 7 commits into
Conversation
Contributor
ApprovabilityVerdict: Not approved Macroscope's review found this PR not approvable — This PR changes default desktop startup, renderer serving, authentication timing, window lifecycle, and provider initialization across multiple production components. It also adds a directive suppressing a static-analysis diagnostic, so the scope and review-sensitive configuration warrant human review. Notes:
You can add or adjust custom eligibility rules. Learn more. |
macroscopeapp
Bot
dismissed
their stale review
September 5, 2026 05:28
Dismissing prior approval to re-evaluate 69aaa3a
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
desktop startup previously serialized renderer loading behind the backend and eagerly initialized provider libraries. this pr loads the bundled renderer while the backend starts, gates authentication on actual readiness, caches compilation, bundles the desktop runtime, and defers provider clients/schemas and optional native imports.
five alternating linux launches per variant with the same isolated project/state and warm compilation caches show an additional meaningful improvement over the previously green head (ac3756f):
half a second for a usable composer was not achieved. these are warm-cache measurements; initial cache population is excluded. earlier passes separately measured desktop 5.605 → 5.140 s and then 5.081 → 4.006 s; those runs used different baselines and are not combined into a single percentage.
verified scoped lint/format, desktop and server typechecks/builds, existing codex adapter/driver and acp tests, and 117 focused existing tests covering turn validation, shell capture, backend, window, and protocol behavior. native linux checks exercised typing, settings, reload, cache disabled/invalid-path fallback, normal quit cache persistence, automatic recovery after a 65-second backend pause, and early close followed by explicit activation. the early-close check retained the linux process to exercise the macos-style window lifecycle. a /proc cache override stalls plain node before application code too; normal invalid-directory fallback passed. native macos, windows, and wsl timings remain unverified; wsl-only retains its existing startup path.
full-resolution recording · raw alternating measurements
the test-only follow-up eec1e06 waits for real probe signals in two existing tests; all 48 provider registry tests pass. production artifacts and benchmark evidence are unchanged.
model: gpt-5.6-sol, codex harness, with parallel implementation agents and two independent final reviews.
Note
Defer provider SDK imports, overlap desktop loading, and add Node compile cache
NODE_COMPILE_CACHEto the dev runner and desktop backend environment to speed up module loading.DesktopWindowlifecycle by serializing concurrentensureMaincalls with a semaphore and tracking intentional window closure to stop backend readiness from auto-reopening it.CodexAppServerSpawnError,ProviderAdapterProcessError, orAcpTransportError; desktop auth waits for backend readiness and returnsDesktopLocalEnvironmentAuthBackendStoppedErrorif readiness fails.Macroscope summarized eec1e06.