-
Notifications
You must be signed in to change notification settings - Fork 107
perf: optimize turbopack resolve plugin handling #2518
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Update next.js submodule with resolve plugin optimizations: - Pre-fetch options once in resolve_inline - Early return for empty plugin lists - Pre-resolve plugin conditions before loop - Consistent package_json().resolve().await? for cache hits - Early return for empty in_package rules Performance improvement: - turbo_tasks::function: -2.2% avg, -9.1% best - turbo_tasks::resolve_call: -3.6% avg, -13.9% best - read file: -43.6% avg, -59.7% best See: utooland/next.js#100
Summary of ChangesHello @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 integrates critical performance optimizations into Turbopack's module resolution process by updating the Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this 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 submodule to incorporate performance optimizations in the Turbopack resolve plugin handling, as detailed in the newly added performance report. The changes result in a notable performance improvement, especially a significant reduction in read file operations.
My review focuses on the clarity and completeness of the performance report. I've suggested minor improvements to make the report easier to understand, such as addressing the skipped section numbering and adding more context to the performance gains.
|
|
||
| --- | ||
|
|
||
| ## 🔍 Tier 4: The Asset Processing Pipeline (P3) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| | `turbo_tasks::function` | 18,459ms | 18,047ms | 16,784ms | **-2.2%** | **-9.1%** | | ||
| | `turbo_tasks::resolve_call` | 4,398ms | 4,240ms | 3,785ms | **-3.6%** | **-13.9%** | | ||
| | `read file` | 1,883ms | 1,062ms | 759ms | **-43.6%** | **-59.7%** | | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The improvement in read file is very significant. To improve clarity, consider adding a brief analysis here explaining how the implemented optimizations in the resolve plugin led to this substantial reduction in file reads. For example, you could mention that pre-resolving plugin conditions avoided many conditional file system checks.
7c22803 to
8d2fe38
Compare
Update next.js submodule with resolve plugin optimizations. See utooland/next.js#100 for details. Performance: -2.2% to -9.1% turbo_tasks::function time.