Skip to content

perf(build): enable unsafe fast drop in non-watch mode#6404

Merged
chenjiahan merged 1 commit intomainfrom
fast_drop_1022
Oct 22, 2025
Merged

perf(build): enable unsafe fast drop in non-watch mode#6404
chenjiahan merged 1 commit intomainfrom
fast_drop_1022

Conversation

@chenjiahan
Copy link
Member

Summary

Enable Rspack's unsafe fast drop when running rspack build to improve build performance.

Before

Screenshot 2025-10-22 at 16 00 46

After

Screenshot 2025-10-22 at 16 00 51

Related Links

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

Copilot AI review requested due to automatic review settings October 22, 2025 08:04
@netlify
Copy link

netlify bot commented Oct 22, 2025

Deploy Preview for rsbuild ready!

Name Link
🔨 Latest commit f38f0cb
🔍 Latest deploy log https://app.netlify.com/projects/rsbuild/deploys/68f8900839862500089033ad
😎 Deploy Preview https://deploy-preview-6404--rsbuild.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 59 (🔴 down 9 from production)
Accessibility: 97 (no change from production)
Best Practices: 100 (no change from production)
SEO: 100 (no change from production)
PWA: 60 (no change from production)
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR enables Rspack's unsafeFastDrop optimization in non-watch mode to improve build performance. The feature is controlled via an environment variable that's automatically set when running builds without watch mode.

Key changes:

  • Sets RSPACK_UNSAFE_FAST_DROP environment variable to 'true' in non-watch build mode
  • Reads the environment variable and enables unsafeFastDrop on the compiler instance

Reviewed Changes

Copilot reviewed 2 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/core/src/cli/commands.ts Sets the environment variable when build is not in watch mode
packages/core/src/provider/createCompiler.ts Reads environment variable and enables unsafe fast drop on the compiler

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@chenjiahan chenjiahan merged commit 4e9fce2 into main Oct 22, 2025
12 checks passed
@chenjiahan chenjiahan deleted the fast_drop_1022 branch October 22, 2025 08:17
@chenjiahan chenjiahan mentioned this pull request Oct 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant