Skip to content

Conversation

@timfish
Copy link
Collaborator

@timfish timfish commented Jan 16, 2026

While benchmarking large projects with Rolldown, I found that MagicString.generateMap() has a large overhead. There are ways to improve this more in the future, however this issue is exacerbated by the fact that we inject up to 3 separate times via 3 separate plugins. Each of these 3 injects into the top of the source and then has to rewrite the sourcemap!

This PR combines the 3 injection plugins into a single plugin which means the chunks only need the sourcemaps generation once.

This PR retains esbuild with 3 separate plugins because I haven't worked out how to migrate that yet.

With an example app of 10k modules and 10MB output file:

  • Rolldown = 900ms
  • Rolldown + Sentry Rollup plugin = 4.5s
  • Rolldown + Sentry Rollup plugin + these changes = 1.8s

@github-actions
Copy link

github-actions bot commented Jan 16, 2026

Semver Impact of This PR

🟡 Minor (new features)

📋 Changelog Preview

This is how your changes will appear in the changelog.
Entries from this PR are highlighted with a left border (blockquote style).


New Features ✨

  • Combine injection plugins by timfish in #844

Bug Fixes 🐛

Plugin Manager

  • Respect sourcemap.ignore values for injecting debugIDs by s1gr1d in #836
  • Enable "rejectOnError" in debug by s1gr1d in #837

Other

  • (vite) Skip HTML injection for MPA but keep it for SPA by s1gr1d in #843

Documentation 📚

  • Add RELEASE.md to document release process by nicohrubec in #834

Build / dependencies / internal 🔧

  • (release) Switch from action-prepare-release to Craft by BYK in #831
  • Use pull_request_target for changelog preview by BYK in #842

Other

  • test: Ensure Debug IDs match by timfish in #840

🤖 This preview updates automatically when you update the PR.

@timfish timfish requested review from Lms24 and andreiborza January 16, 2026 16:20
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