Skip to content

fix(pack): resolve dotted global externals - #3417

Merged
fireairforce merged 2 commits into
nextfrom
zoomdong/fix-dotted-global-externals
Oct 22, 2026
Merged

fireairforce merged 2 commits into
nextfrom
zoomdong/fix-dotted-global-externals

Conversation

@fireairforce

@fireairforce fireairforce commented Oct 22, 2026 •

Copy link
Copy Markdown
Member

Summary

Plain string externals such as "window.ge.multimediaPlugin" currently look up a single dotted key, so the Galacean multimedia plugin resolves to undefined. Normalize dots to the existing internal global-property path format so this mapping reads globalThis["window"]["ge"]["multimediaPlugin"]; framework-normalized "ge.multimediaPlugin" also resolves correctly.

Limit the change to basic global strings. Advanced global objects keep their literal-key behavior, and explicit external types use their existing paths. Add one snapshot fixture with runtime assertions for the reported case.

Test Plan

  • Externals snapshot suite, including the new dotted-global fixture
  • cargo fmt
  • cargo clippy --all-targets -- -D warnings --no-deps
  • Repository pre-push checks: Rust formatting, Tombi, Biome, and typos

@chatgpt-codex-connector

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 ⚠️ Failed 2026-10-22T04:12:21.255059Z
We couldn’t complete this review. Comment @codex review to try again.
fdf95c4 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.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@PeachScript PeachScript 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.

+1

@fireairforce
fireairforce enabled auto-merge (squash) October 22, 2026 06:15
@github-actions

Copy link
Copy Markdown

📊 Performance Benchmark Report (with-antd)

Utoopack Performance Report

Report ID: utoopack_performance_report_20261022_061636
Generated: 2026-10-22 06:16:36
Trace File: trace_antd.json (0.3GB, 0.84M spans)
Test Project: examples/with-antd


Executive Summary

Metric Value Assessment
Total Wall Time 6,864.4 ms Baseline
Total Thread Work (de-duped) 20,401.4 ms Non-overlapping busy time
Effective Parallelism 3.0x thread_work / wall_time
Working Threads 10 Threads with actual spans
Thread Utilization 29.7% ⚠️ Suboptimal
Total Spans 844,640 All B/E + X events
Meaningful Spans (>= 10us) 215,532 (25.5% of total)
Tracing Noise (< 10us) 629,108 (74.5% of total)

Build Phase Timeline

Shows when each build phase is active and how much CPU it consumes.
Self-Time is the time spent exclusively in that phase (excluding children).

Phase Spans Inclusive (ms) Self-Time (ms) Wall Range (ms)
Resolve 47,370 6,459.7 1,751.7 3,180.2
Parse 8,163 1,453.8 1,092.3 6,113.7
Analyze 141,629 43,284.6 9,118.1 6,022.2
Chunk 5,084 5,362.3 799.1 2,541.5
Codegen 10,472 2,411.8 1,516.2 2,191.2
Emit 33 48.2 24.1 11.6
Other 2,781 7,972.3 4,494.6 6,864.3

Workload Distribution by Diagnostic Tier

Category Spans Inclusive (ms) % Work Self-Time (ms) % Self
P0: Scheduling & Resolution 189,253 50,396.1 247.0% 11,125.6 54.5%
P1: I/O & Heavy Tasks 2,893 130.5 0.6% 106.5 0.5%
P2: Architecture (Locks/Memory) 0 0.0 0.0% 0.0 0.0%
P3: Asset Pipeline 22,289 9,257.9 45.4% 3,425.1 16.8%
P4: Bridge/Interop 0 0.0 0.0% 0.0 0.0%
Other 1,097 7,208.2 35.3% 4,139.0 20.3%

Top 20 Tasks by Self-Time

Self-time is the exclusive duration: time spent in the task itself, not in sub-tasks.
This is the most accurate indicator of where CPU cycles are actually spent.

Self (ms) Inclusive (ms) Count Avg Self (us) P95 Self (ms) Max Self (ms) % Work Task Name Top Caller
4,341.4 25,513.5 95,393 45.5 0.1 15.6 21.3% module module (61%)
2,652.0 3,034.4 19 139581.5 355.6 480.9 13.0% save snapshot persist (5%)
2,353.0 2,478.7 2,464 955.0 3.0 292.5 11.5% analyze ecmascript module module (70%)
1,512.9 14,109.6 34,129 44.3 0.1 9.0 7.4% process module process module (82%)
1,143.3 3,154.4 25,014 45.7 0.1 6.1 5.6% internal resolving internal resolving (75%)
1,018.8 1,380.3 5,991 170.1 0.6 91.2 5.0% parse ecmascript parse ecmascript (66%)
837.3 914.3 8,239 101.6 0.4 6.1 4.1% precompute code generation generate merged code (52%)
767.0 931.4 7,024 109.2 0.4 140.0 3.8% compute async module info compute async module info (58%)
681.4 5,111.2 3,980 171.2 0.3 45.2 3.3% chunking chunking (44%)
678.1 2,213.2 827 819.9 1.8 237.2 3.3% generate merged code chunking (54%)
599.6 3,296.4 21,668 27.7 0.0 4.0 2.9% resolving module (58%)
464.1 464.1 329 1410.6 1.2 284.7 2.3% generate source map code generation (83%)
396.0 833.2 130 3046.1 4.7 246.5 1.9% emit code generate merged code (42%)
383.6 383.6 8 47956.2 188.5 208.0 1.9% blocking save snapshot (62%)
334.1 595.1 1,323 252.6 0.1 189.2 1.6% write all entrypoints to disk write all entrypoints to disk (14%)
214.8 1,033.4 1,904 112.8 0.3 54.3 1.1% code generation code generation (83%)
114.4 247.1 1,062 107.7 0.2 11.1 0.6% compute async chunks compute async chunks (53%)
91.0 103.5 742 122.6 0.0 33.1 0.4% compute binding usage info compute binding usage info (47%)
73.5 73.5 2,169 33.9 0.0 3.0 0.4% read file parse ecmascript (91%)
37.7 68.7 1,861 20.3 0.0 12.2 0.2% collect mergeable modules collect mergeable modules (100%)

Critical Path Analysis

The longest sequential dependency chains that determine wall-clock time.
Focus on reducing the depth of these chains to improve parallelism.

Rank Self-Time (ms) Depth Path
1 688.9 3 persist → save snapshot → blocking
2 487.4 6 chunking → generate merged code → emit code → emit code → emit code → read file
3 335.8 4 chunking → generate merged code → emit code → generate source map
4 331.4 2 save snapshot → blocking
5 293.6 3 process module → analyze ecmascript module → analyze ecmascript module

Batching Candidates

High-volume tasks dominated by a single parent. If the parent can batch them,
it drastically reduces scheduler overhead.

Task Name Count Top Caller (Attribution) Avg Self P95 Self Total Self
process module 34,129 process module (82%) 44.3 us 0.07 ms 1,512.9 ms
internal resolving 25,014 internal resolving (75%) 45.7 us 0.09 ms 1,143.3 ms

Duration Distribution

Range Count Percentage
<10us 629,108 74.5%
10us-100us 139,178 16.5%
100us-1ms 64,941 7.7%
1ms-10ms 11,176 1.3%
10ms-100ms 199 0.0%
>100ms 38 0.0%

Action Items

  1. [P0] Focus on tasks with the highest Self-Time — these are where CPU cycles are actually spent.
  2. [P0] Use Batching Candidates to identify callers that should use try_join or reduce #[turbo_tasks::function] granularity.
  3. [P1] Check Build Phase Timeline for phases with disproportionate wall range vs. self-time (= serialization).
  4. [P1] Inspect P95 Self (ms) for heavy monolith tasks. Focus on long-tail outliers, not averages.
  5. [P1] Review Critical Paths — reducing the longest chain depth directly improves wall-clock time.
  6. [P2] If Thread Utilization < 60%, investigate scheduling gaps (lock contention or deep dependency chains).

Report generated by Utoopack Performance Analysis Agent

@fireairforce
fireairforce merged commit ed83ea1 into next Oct 22, 2026
48 checks passed
@fireairforce
fireairforce deleted the zoomdong/fix-dotted-global-externals branch October 22, 2026 06:47
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