Skip to content

fix(wasm): turbo fs watcher should not ignore node_modules#2551

Merged
xusd320 merged 1 commit intonextfrom
fix/node_modules_watch
Jan 29, 2026
Merged

fix(wasm): turbo fs watcher should not ignore node_modules#2551
xusd320 merged 1 commit intonextfrom
fix/node_modules_watch

Conversation

@xusd320
Copy link
Contributor

@xusd320 xusd320 commented Jan 29, 2026

Enable watcher for node_modules in turbo_task_fs

@gemini-code-assist
Copy link
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 addresses a critical issue in the file system watcher by updating the 'next.js' submodule. The update ensures that the 'turbo_task_fs' watcher now correctly includes 'node_modules' in its monitoring scope, which is essential for accurate dependency tracking and development workflows. This change improves the reliability of the build process by preventing overlooked changes within project dependencies.

Highlights

  • Submodule Update: The 'next.js' submodule has been updated from commit '99118832ade1f5fe11d747ccb59ab4038d8e1a32' to 'b30934dbfaabad1f52dc32abb2838b2aad223b9b'.
  • Watcher Configuration Fix: This submodule update specifically enables the 'turbo_task_fs' watcher to correctly monitor 'node_modules' directories, resolving an issue where they were previously ignored.
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.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

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 updates the next.js subproject commit to b30934dbfaabad1f52dc32abb2838b2aad223b9b. This change is intended to address an issue where the turbo fs watcher was ignoring node_modules, as indicated by the pull request title and description. The update seems to correctly integrate the fix from the turbo_task_fs subproject.

@xusd320 xusd320 merged commit 9e40d2d into next Jan 29, 2026
23 checks passed
@xusd320 xusd320 deleted the fix/node_modules_watch branch January 29, 2026 12:02
@github-actions
Copy link

📊 Performance Benchmark Report (with-antd)

🚀 Utoopack Performance Report: Async Task Scheduling Overhead Analysis

Report ID: utoopack_performance_report_20260129_120828
Generated: 2026-01-29 12:08:28
Trace File: trace_antd.json (1.5GB, 8.00M events)
Test Project: Unknown Project


📊 Executive Summary

This report analyzes the performance of Utoopack/Turbopack, covering the full spectrum of the Performance Analysis Protocol (P0-P4).

Key Findings

Metric Value Assessment
Total Wall Time 10,134.4 ms Baseline
Total Thread Work 88,326.7 ms ~8.7x parallelism
Thread Utilization 96.8% ✅ Good
turbo_tasks::function Invocations 3,883,544 Total count
Meaningful Tasks (≥ 10µs) 1,514,071 (39.0% of total)
Tracing Noise (< 10µs) 2,369,473 (61.0% of total)

Workload Distribution by Tier

Category Tasks Total Time (ms) % of Work
P0: Runtime/Resolution 1,036,880 53,408.1 60.5%
P1: I/O & Heavy Tasks 36,824 3,493.0 4.0%
P3: Asset Pipeline 27,787 4,383.3 5.0%
P4: Bridge/Interop 0 0.0 0.0%
Other 412,580 19,617.8 22.2%

⚡ Parallelization Analysis (P0-P2)

Thread Utilization

Metric Value
Number of Threads 9
Total Thread Work 88,326.7 ms
Avg Work per Thread 9,814.1 ms
Theoretical Parallelism 8.72x
Thread Utilization 96.8%

Assessment: With 9 threads available, achieving 8.7x parallelism indicates reasonable throughput.


📈 Top 20 Tasks (Global)

These are the most significant tasks by total duration:

Total (ms) Count Avg (µs) % Work Task Name
44,413.5 863,070 51.5 50.3% turbo_tasks::function
8,436.6 123,359 68.4 9.6% task execution completed
6,372.9 80,946 78.7 7.2% turbo_tasks::resolve_call
2,868.8 31,917 89.9 3.2% analyze ecmascript module
2,169.7 66,966 32.4 2.5% precompute code generation
2,078.6 67,842 30.6 2.4% resolving
1,784.2 35,472 50.3 2.0% module
1,611.1 20,336 79.2 1.8% effects processing
1,519.8 11,576 131.3 1.7% process parse result
1,152.3 6,428 179.3 1.3% parse ecmascript
1,091.9 35,668 30.6 1.2% internal resolving
1,081.3 31,306 34.5 1.2% process module
848.7 28,315 30.0 1.0% resolve_relative_request
611.6 1,912 319.9 0.7% analyze variable values
487.7 15,477 31.5 0.6% resolve_module_request
482.6 19,037 25.3 0.5% handle_after_resolve_plugins
438.0 1,943 225.4 0.5% swc_parse
434.5 10,931 39.8 0.5% code generation
384.4 4,209 91.3 0.4% read file
376.2 17,422 21.6 0.4% resolved

🔍 Deep Dive by Tier

🔴 Tier 1: Runtime & Resolution (P0)

Focus: Task scheduling and dependency resolution.

Metric Value Status
Total Scheduling Time 53,408.1 ms ⚠️ High
Resolution Hotspots 9 tasks 🔍 Check Top Tasks

Potential P0 Issues:

  • Low thread utilization (96.8%) suggests critical path serialization or lock contention.
  • 2,369,473 tasks < 10µs (61.0%) 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,493.0 ms ✅ Healthy
Large Tasks (> 100ms) 19 🚨 Critical

Potential P1 Issues:

  • 19 tasks exceed 100ms. These "Heavy Monoliths" are prime candidates for splitting.

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

Focus: Global state and transformation pipeline.

Metric Value Status
Asset Processing (P3) 4,383.3 ms 5.0% of work
Bridge Overhead (P4) 0.0 ms ✅ Low

💡 Recommendations (Prioritized P0-P2)

🚨 Critical: (P0) Improvement

Problem: 96.8% thread utilization.
Action:

  1. Profile lock contention if utilization < 60%.
  2. Convert sequential await chains to try_join.

⚠️ High Priority: (P1) Optimization

Problem: 19 heavy tasks detected.
Action:

  1. Identify module-level bottlenecks (e.g., barrel files).
  2. Optimize I/O batching for metadata.

⚠️ Medium Priority: (P3) Pipeline Efficiency

Action:

  1. Review transformation logic for frequently changed assets.
  2. Minimize cross-language serialization (P4) if overhead exceeds 10%.

📐 Diagnostic Signal Summary

Signal Status Finding
Tracing Noise (P0) ⚠️ Significant 61.0% of tasks < 10µs
Thread Utilization (P0) ✅ Good 96.8% utilization
Heavy Monoliths (P1) ⚠️ Detected 19 tasks > 100ms
Asset Pipeline (P3) 🔍 Review 4,383.3 ms total
Bridge/Interop (P4) ✅ Low 0.0 ms total

🎯 Action Items (Comprehensive P0-P4)

  1. [P0] Investigate task scheduling gaps for incremental gains
  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-01-29
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