perf(pack): isolate multi-page endpoints - #3297
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fc2e52c047
ℹ️ 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".
f7814bf to
37b9d25
Compare
📊 Performance Benchmark Report (with-antd)Utoopack Performance ReportReport ID: Executive Summary
Build Phase TimelineShows when each build phase is active and how much CPU it consumes.
Workload Distribution by Diagnostic Tier
Top 20 Tasks by Self-TimeSelf-time is the exclusive duration: time spent in the task itself, not in sub-tasks.
Critical Path AnalysisThe longest sequential dependency chains that determine wall-clock time.
Batching CandidatesHigh-volume tasks dominated by a single parent. If the parent can batch them,
Duration Distribution
Action Items
Report generated by Utoopack Performance Analysis Agent |
Summary
Utoopack previously aggregated all regular app entries into one
AppEndpoint, which prevented page-level scheduling and made each generated HTML file include assets from every page.This PR now:
AppEndpointper regular app entry while sharing the project module/runtime contexts;server.entrywork concurrently;server.functionstill intentionally scans all Client graphs to discover server references;Observable API note:
entrypoints.appsnow contains one endpoint per ordinary app entry instead of one aggregate endpoint. The endpoint order remains the filtered config entry order. A configured global HTML file still needs the union of all endpoint assets, so regenerating that single global file remains O(N), but concurrent updates are coalesced into one ordered writer.Paired clean-build benchmarks with persistent cache disabled:
server.entry(follow-up vs original PR head)For the 32-page HTML fixture, each page now includes one owning entry script instead of all 32 entry scripts. A real 19-page EVJS MPA likewise dropped from 19 page entry scripts per HTML file to 1; all 19 pages returned HTTP 200, and page HMR remained scoped after rebuild.
Test Plan
cargo fmt --checkcargo clippy --all-targets -- -D warnings --no-depsUPDATE=1 cargo test -p pack-tests --test snapshot multi_page_shared_outputs -- --ignored --nocapturenpm test --workspace @utoo/pack(55 passed)npm run build:js --workspace @utoo/packnpx biome cinpx tsc -p packages/pack/tsconfig.json --noEmitserver.entry, persistent cache disabled.