Skip to content

fix: memory leak in i18n builds - #12327

Open
SimonSiefke wants to merge 1 commit into
facebook:mainfrom
SimonSiefke:fix/memory-leak-i18n-build
Open

fix: memory leak in i18n builds#12327
SimonSiefke wants to merge 1 commit into
facebook:mainfrom
SimonSiefke:fix/memory-leak-i18n-build

Conversation

@SimonSiefke

Copy link
Copy Markdown

fix #10944

Details

Rspack keeps each custom chunk-asset runtime module's bound generator alive after compiler shutdown. Its compilation, chunk, and chunk graph references retain the complete compiler graph across localized builds.

Change

Track the current compilation's chunk-asset runtime modules and clear their compiler graph references during shutdown.

Before

When the fresh Docusaurus i18n build scenario runs six locale builds in one process, retained compiler hooks, stats, and MDX processors grow:

docusaurus-i18n-build-before

After

No more retained Docusaurus compiler graphs are detected.
docusaurus-i18n-build-after

Additional Info

  • PR is AI-generated
  • Model: Codex (GPT-5.6)
  • Worktime: 1 hour, 14 minutes, 15 seconds

@meta-cla meta-cla Bot added the CLA Signed Signed Facebook CLA label Jul 29, 2026
@netlify

netlify Bot commented Jul 29, 2026

Copy link
Copy Markdown

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 57d50a8
🔍 Latest deploy log https://app.netlify.com/projects/docusaurus-2/deploys/6a6a83b85c9daf000877d454
😎 Deploy Preview https://deploy-preview-12327--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

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

@SyMind

SyMind commented Jul 30, 2026

Copy link
Copy Markdown

This is a bug on the Rspack binding side. I’ll follow up on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed Signed Facebook CLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docusaurus leaks memory on i18n site builds

2 participants