Skip to content

perf: Add transform cache, sourcemap dedupe and skip compile for js assets#1014

Open
arthurfiorette wants to merge 10 commits intoswc-project:masterfrom
arthurfiorette:perf-improvements-2
Open

perf: Add transform cache, sourcemap dedupe and skip compile for js assets#1014
arthurfiorette wants to merge 10 commits intoswc-project:masterfrom
arthurfiorette:perf-improvements-2

Conversation

@arthurfiorette
Copy link

@arthurfiorette arthurfiorette commented Mar 13, 2026

This PR adds some main performance improvements:

  1. Uses a transform cache to improve on rebuilds/watch mode.
  2. Split sourcemap usage into either both or inline only to reduce memory consumption when --enable-source-maps are enabled.
  3. Smartly only transform needed files instead of blindly transforming all JS/TS files.
  4. Performs a fast minification of transpiled code to reduce cache I/O and size.

This PR also fixed a bug and test sourcemaps.spec.ts is now correct. From my understanding it was incorrectly testing for line 18 instead of 30.

@CLAassistant
Copy link

CLAassistant commented Mar 13, 2026

CLA assistant check
All committers have signed the CLA.

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants