Skip to content

fix(pack): output_root & doc update - #2609

Merged
fireairforce merged 2 commits into
nextfrom
fix-classic-remove-react-import
Feb 24, 2026
Merged

fix(pack): output_root & doc update#2609
fireairforce merged 2 commits into
nextfrom
fix-classic-remove-react-import

Conversation

@fireairforce

@fireairforce fireairforce commented Feb 24, 2026

Copy link
Copy Markdown
Member

Summary

output_root cause project chunk load error: #2582 (comment)

Doc config cause build error like:

image

Test Plan

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @fireairforce, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request addresses critical issues related to project build configurations and documentation accuracy. It corrects a bug where client-side chunk loading failed due to an incorrect output root path, ensuring proper asset resolution. Additionally, it updates the pack package's README.md to reflect the current API for build and dev functions, preventing configuration-related build errors for users following the documentation.

Highlights

  • Output Root Fix: Resolved an issue where output_root was incorrectly using dist_root(), leading to project chunk load errors, by switching to client_root().
  • Documentation Update: Updated the README.md examples for build and dev functions to correctly pass configuration parameters within a config object, addressing build errors caused by outdated documentation.
Changelog
  • crates/pack-api/src/project.rs
    • Changed the source for output_root from self.dist_root().owned().await? to self.client_root().owned().await? within get_client_chunking_context.
  • packages/pack/README.md
    • Wrapped the configuration object passed to the build function call within a config property.
    • Wrapped the configuration object passed to the dev function call within a config property.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request addresses two separate issues. First, it fixes a chunk loading error by correctly setting the output_root to client_root in the client chunking context. This ensures that in-memory assets are correctly handled, which is a solid improvement. Second, it updates the usage examples in the README.md to align with a recent API change, where configuration options are now nested under a config object. I've made one minor suggestion to fix an indentation issue in a code example in the README for better readability.

Comment thread packages/pack/README.md Outdated
@fireairforce
fireairforce merged commit 73c5e19 into next Feb 24, 2026
16 checks passed
@fireairforce
fireairforce deleted the fix-classic-remove-react-import branch February 24, 2026 07:32
@github-actions

Copy link
Copy Markdown

📊 Performance Benchmark Report (with-antd)

Utoopack Performance Report

Report ID: utoopack_performance_report_20260224_073927
Generated: 2026-02-24 07:39:27
Trace File: trace_antd.json (0.5GB, 3.18M events)
Test Project: examples/with-antd


Executive Summary

Key Findings

Metric Value Assessment
Total Wall Time 8,081.1 ms Baseline
Total Thread Work (de-duped) 25,247.2 ms Non-overlapping busy time
Effective Parallelism 3.1x thread_work / wall_time
Working Threads 5 Threads with actual spans
Thread Utilization 62.5% 🆗 Average
Total Spans 1,589,288 All B/E + X events
Meaningful Spans (>= 10us) 521,157 (32.8% of total)
Tracing Noise (< 10us) 1,068,131 (67.2% of total)

Note on Thread Work: Thread work is computed by merging overlapping intervals
per thread, eliminating double-counting from nested spans. This gives the true
wall-clock busy time across all threads.

Workload Distribution by Tier

Category Tasks Total Time (ms) % of Thread Work
P0: Runtime/Resolution 0 0.0 0.0%
P1: I/O & Heavy Tasks 38,764 3,529.9 14.0%
P3: Asset Pipeline 28,871 3,302.9 13.1%
P4: Bridge/Interop 0 0.0 0.0%
Other 453,522 21,541.2 85.3%

Note: Percentages may sum to >100% because task durations include nesting
while thread work is de-duplicated. This is intentional for hotspot attribution.


Parallelization Analysis

Thread Utilization

Metric Value
Working Threads 5
Total Thread Work (de-duped) 25,247.2 ms
Avg Work per Thread 5,049.4 ms
Effective Parallelism 3.12x
Thread Utilization 62.5%

Assessment: With 5 working threads, achieving 3.1x parallelism indicates significant loss of potential parallelism.


Top 20 Tasks by Total Duration

Total (ms) Count Avg (us) Max (ms) % Work Task Name
8,235.6 187,658 43.9 8.7 32.6% module
3,965.8 72,373 54.8 162.0 15.7% process module
3,444.4 35,895 96.0 162.0 13.6% analyze ecmascript module
2,813.7 24,455 115.1 59.4 11.1% code generation
1,846.8 63,847 28.9 8.4 7.3% internal resolving
1,772.9 59,106 30.0 8.7 7.0% resolving
1,369.9 30,040 45.6 7.4 5.4% precompute code generation
1,361.7 14,095 96.6 49.5 5.4% chunking
1,214.1 12,848 94.5 113.5 4.8% compute async module info
1,063.3 8,045 132.2 41.0 4.2% parse ecmascript
496.2 4,691 105.8 49.0 2.0% compute async chunks
311.6 1,936 160.9 17.8 1.2% generate source map
73.7 2,169 34.0 3.3 0.3% read file
67.6 649 104.1 18.9 0.3% compute binding usage info
64.7 1,870 34.6 13.3 0.3% collect mergeable modules
54.2 98 553.2 15.5 0.2% make production chunks
46.1 560 82.4 8.3 0.2% async reference
38.6 14 2758.1 15.3 0.2% apply effects
37.9 13 2916.7 15.2 0.2% write file
30.3 6 5053.0 15.5 0.1% compute merged modules

Deep Dive by Tier

Tier 1: Runtime & Resolution (P0)

Focus: Task scheduling and dependency resolution.

Metric Value Status
Total Scheduling Time 0.0 ms ✅ Normal
Resolution Hotspots 0 distinct task types Check Top Tasks

Potential P0 Issues:

  • Thread utilization at 62.5% suggests critical path serialization or lock contention.
  • 1,068,131 spans < 10us (67.2%) contribute to scheduler pressure.

Tier 2: Physical & Resource Barriers (P1)

Focus: Hardware utilization, I/O, and heavy monoliths.

Metric Value Status
I/O Work (Estimated) 3,529.9 ms ✅ Healthy
Large Tasks (> 100ms) 3 Minimal

Tier 3: Architecture & Asset Pipeline (P2-P3)

Focus: Global state and transformation pipeline.

Metric Value Status
Asset Processing (P3) 3,302.9 ms 13.1% of work
Bridge Overhead (P4) 0.0 ms ✅ Low

Duration Distribution

Range Count Percentage
< 10us (noise) 1,068,131 67.2%
10us - 100us 494,968 31.1%
100us - 1ms 22,164 1.4%
1ms - 10ms 3,952 0.2%
10ms - 100ms 70 0.0%
> 100ms 3 0.0%

Diagnostic Signal Summary

Signal Status Finding
Tracing Noise (P0) ⚠️ Significant 67.2% of spans < 10us
Thread Utilization (P0) 🆗 Average 62.5% utilization
Heavy Monoliths (P1) ✅ Minimal 3 tasks > 100ms
Asset Pipeline (P3) Review 3,302.9 ms total
Bridge/Interop (P4) Low 0.0 ms total

Action Items (P0-P4)

  1. [P0] Profile lock contention to address 37% lost parallelism
  2. [P1] Breakdown heavy monolith tasks (>100ms) to improve granularity
  3. [P1] Review I/O patterns for potential batching opportunities
  4. [P3] Optimize asset transformation pipeline hot-spots
  5. [P4] Reduce "chatty" bridge operations if interop overhead is significant

Report generated by Utoopack Performance Analysis Agent on 2026-02-24
Following: Utoopack Performance Analysis Agent Protocol

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