refactor(pack): check worker_threads support, remove useless configs#2711
Conversation
Summary of ChangesHello, 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 significantly refactors the project's configuration management by eliminating experimental settings and streamlining config handling across both Rust and TypeScript components. It also introduces a more robust and dynamic approach to selecting runtime plugin strategies, ensuring compatibility and optimal performance based on the Node.js environment. These changes aim to simplify the codebase, remove deprecated features, and enhance the overall maintainability and adaptability of the system. 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. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request effectively refactors the configuration by removing experimental settings and introducing a dynamic runtime plugin strategy based on Node.js version. The changes are well-aligned with the description, including dependency updates and cleanup of legacy code. The new useWorkerThreads utility provides a clear mechanism for runtime selection. Overall, the changes improve the codebase's clarity and adaptability.
96e0ce5 to
669ecbb
Compare
| }, | ||
| pluginRuntimeStrategy: useWorkerThreads() | ||
| ? "workerThreads" | ||
| : (bundleOptions?.config?.pluginRuntimeStrategy ?? "childProcesses"), |
There was a problem hiding this comment.
workerThread 不可用的情况下,用户仍然配置了 workerThread,是不是弹一个 warning 提示用户比较合适?
There was a problem hiding this comment.
改了一下策略,默认按照用户配置的 pluginRuntimeStrategy,绝大部分用户应该都不需要配置这个。
669ecbb to
5934ac6
Compare
📊 Performance Benchmark Report (with-antd)Utoopack Performance ReportReport ID: Executive Summary
Build Phase TimelineShows when each build phase is active and how much CPU it consumes.
Workload Distribution by Diagnostic Tier
Top 20 Tasks by Self-TimeSelf-time is the exclusive duration: time spent in the task itself, not in sub-tasks.
Critical Path AnalysisThe longest sequential dependency chains that determine wall-clock time.
Batching CandidatesHigh-volume tasks dominated by a single parent. If the parent can batch them,
Duration Distribution
Action Items
Report generated by Utoopack Performance Analysis Agent |
Uh oh!
There was an error while loading. Please reload this page.