Skip to content

perf(desktop): bundle the renderer's initial module graph as one chunk - #50110

Merged
Hona merged 2 commits into
v2from
single-renderer-chunk
Sep 20, 2026
Merged

Hona merged 2 commits into
v2from
single-renderer-chunk

Conversation

@Hona

@Hona Hona commented Sep 20, 2026

Copy link
Copy Markdown
Member

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Please provide a description of the issue, the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say as much so a maintainer knows how much to value the PR.

If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!

How did you verify your code works?

Screenshots / recordings

If this is a UI change, please include a screenshot or recording.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

Copilot AI lite review requested due to automatic review settings September 20, 2026 06:13
@Hona
Hona requested a review from Brendonovich as a code owner September 20, 2026 06:13

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.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@Hona
Hona added this pull request to stack #50115 September 20, 2026 06:13
…e main bundle

The oc:// handler runs on the main thread, so a ~100 ms module evaluation used to sit between the renderer and its HTML. The entry module now waits for the renderer's initial burst of asset requests to be answered (40 ms quiet, 400 ms cap) before importing the bundle.
Everything statically reachable from the renderer entry is grouped into one chunk (codeSplitting.groups walking importers), so startup fetches one file from the oc:// handler instead of 47 served one main-thread turn each. Lazy routes keep their own chunks.
@Hona
Hona force-pushed the single-renderer-chunk branch from fb6a88c to 5e1aa4f Compare September 20, 2026 06:17
Base automatically changed from serve-assets-first to v2 September 20, 2026 06:18
@Hona
Hona merged commit 7e88f6b into v2 Sep 20, 2026
13 checks passed
@Hona
Hona deleted the single-renderer-chunk branch September 20, 2026 06:19
jinhuang712 pushed a commit to jinhuang712/opencode that referenced this pull request Sep 26, 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.

2 participants