Skip to content

chore(deps): update rust toolchain and dependencies - #2586

Merged
xusd320 merged 2 commits into
nextfrom
chore/update-deps-and-logging
Feb 11, 2026
Merged

xusd320 merged 2 commits into
nextfrom
chore/update-deps-and-logging

Conversation

@xusd320

@xusd320 xusd320 commented Feb 10, 2026

Copy link
Copy Markdown
Contributor
  • Update rust-toolchain to nightly-2026-02-05
  • Change default log level to info in project.rs
  • Update package.json deps for with-antd example
  • Minor updates to analyze_trace.py

- Update rust-toolchain to nightly-2026-02-05
- Change default log level to info in project.rs
- Update package.json deps for with-antd example
- Minor updates to analyze_trace.py
@gemini-code-assist

Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @xusd320, 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 primarily focuses on maintenance and tooling improvements across the project. It updates the Rust toolchain to a newer nightly version and refreshes Node.js dependencies, including adding CSS preprocessor support for an example application. A major enhancement involves a substantial refactor of the Python-based trace analysis script, making it more robust and providing deeper insights into performance characteristics. Additionally, a minor adjustment to the default logging level in a Rust module aims to reduce log output verbosity.

Highlights

  • Rust Toolchain Update: The Rust nightly toolchain has been updated to nightly-2026-02-05, ensuring the project uses a more recent and potentially more stable or feature-rich compiler version.
  • Enhanced Trace Analysis Script: The analyze_trace.py script received a significant refactor, introducing a multi-pass analysis approach for more accurate thread work calculation, streaming JSON parsing for large files, and a more detailed performance report with improved metrics and action items.
  • Logging Configuration Adjustment: The default logging level in crates/pack-napi/src/pack_api/project.rs was changed from trace to info, reducing verbosity in typical operations and focusing on more critical information.
  • Node.js Dependency Updates: The package.json for the with-antd example now includes less and less-loader, and the package-lock.json has been extensively updated to reflect these changes, including version bumps for less-loader and standardization of peer dependency flags across many packages.
Changelog
  • agents/tools/analyze_trace.py
    • Added detailed design decisions to the script's header comments.
    • Refactored trace analysis into three distinct passes for span pairing, non-overlapping thread work calculation, and task-level statistics.
    • Implemented streaming JSON parsing for large trace files using ijson with a fallback to json.load.
    • Updated the generated performance report to include more comprehensive metrics, assessments, and action items.
    • Introduced a helper function _load_events for flexible trace data loading.
    • Modified the script to accept an optional project_name argument.
  • crates/pack-napi/src/pack_api/project.rs
    • Configured ChromeLayerBuilder to explicitly exclude arguments in tracing.
    • Changed the default tracing EnvFilter from "trace" to "info".
  • examples/with-antd/package.json
    • Added less and less-loader as new development dependencies.
  • package-lock.json
    • Updated less-loader version from 12.3.0 to 12.3.1.
    • Broadened the peer dependency range for @rspack/core in less-loader.
    • Standardized peer: true flags for numerous dependencies, adding it to some and removing it from others, reflecting dependency resolution changes.
  • rust-toolchain.toml
    • Updated the Rust nightly channel to nightly-2026-02-05.
Activity
  • The pull request was created by xusd320.
  • The Rust toolchain was updated to a newer nightly version.
  • The analyze_trace.py script underwent a significant refactor to improve performance analysis capabilities.
  • Node.js dependencies were updated, including adding less and less-loader to the with-antd example.
  • The default logging level in project.rs was adjusted.
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 primarily involves dependency updates, a Rust toolchain upgrade, and a significant refactoring of the analyze_trace.py script. The script refactoring is a substantial improvement, introducing a more accurate multi-pass analysis for performance metrics and adding streaming JSON parsing to handle large files efficiently. The changes in project.rs to reduce trace log verbosity are also sensible. Overall, the changes enhance correctness, performance, and maintainability. I have one suggestion to further optimize file handling in the Python script.

Comment thread agents/tools/analyze_trace.py Resolved
@xusd320
xusd320 enabled auto-merge (squash) February 10, 2026 15:58
@github-actions

Copy link
Copy Markdown

📊 Performance Benchmark Report (with-antd)

Utoopack Performance Report

Report ID: utoopack_performance_report_20260210_161300
Generated: 2026-02-10 16:13:00
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 7,822.8 ms Baseline
Total Thread Work (de-duped) 24,668.2 ms Non-overlapping busy time
Effective Parallelism 3.2x thread_work / wall_time
Working Threads 5 Threads with actual spans
Thread Utilization 63.1% 🆗 Average
Total Spans 1,589,423 All B/E + X events
Meaningful Spans (>= 10us) 498,805 (31.4% of total)
Tracing Noise (< 10us) 1,090,618 (68.6% 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 37,833 3,479.4 14.1%
P3: Asset Pipeline 29,009 3,301.1 13.4%
P4: Bridge/Interop 0 0.0 0.0%
Other 431,963 20,762.6 84.2%

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) 24,668.2 ms
Avg Work per Thread 4,933.6 ms
Effective Parallelism 3.15x
Thread Utilization 63.1%

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


Top 20 Tasks by Total Duration

Total (ms) Count Avg (us) Max (ms) % Work Task Name
7,788.9 177,908 43.8 15.3 31.6% module
3,962.5 67,581 58.6 210.8 16.1% process module
3,413.7 34,960 97.6 210.7 13.8% analyze ecmascript module
2,755.4 24,362 113.1 60.9 11.2% code generation
1,726.1 56,302 30.7 11.5 7.0% resolving
1,656.5 60,631 27.3 9.7 6.7% internal resolving
1,402.4 14,179 98.9 43.5 5.7% chunking
1,343.8 28,956 46.4 14.0 5.4% precompute code generation
1,241.9 13,125 94.6 120.7 5.0% compute async module info
1,026.5 8,030 127.8 60.5 4.2% parse ecmascript
503.1 4,729 106.4 45.6 2.0% compute async chunks
289.7 1,936 149.6 20.9 1.2% generate source map
62.3 129 483.3 19.5 0.3% make production chunks
61.1 557 109.7 15.0 0.2% compute binding usage info
59.2 1,858 31.8 11.3 0.2% collect mergeable modules
56.7 2,165 26.2 0.5 0.2% read file
33.4 14 2388.0 10.7 0.1% apply effects
32.8 5 6556.2 19.5 0.1% compute merged modules
32.2 566 56.9 4.5 0.1% async reference
29.9 13 2300.8 10.6 0.1% write file

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 63.1% suggests critical path serialization or lock contention.
  • 1,090,618 spans < 10us (68.6%) 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,479.4 ms ✅ Healthy
Large Tasks (> 100ms) 5 Minimal

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

Focus: Global state and transformation pipeline.

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

Duration Distribution

Range Count Percentage
< 10us (noise) 1,090,618 68.6%
10us - 100us 474,552 29.9%
100us - 1ms 20,373 1.3%
1ms - 10ms 3,799 0.2%
10ms - 100ms 76 0.0%
> 100ms 5 0.0%

Diagnostic Signal Summary

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

Action Items (P0-P4)

  1. [P0] Profile lock contention to address 36% 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-10
Following: Utoopack Performance Analysis Agent Protocol

@xusd320
xusd320 merged commit 5a68065 into next Feb 11, 2026
23 checks passed
@xusd320
xusd320 deleted the chore/update-deps-and-logging branch February 11, 2026 03:11
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