Skip to content

rstackjs/build-tools-performance

Repository files navigation

Build Tools Comparison

Benchmark comparing JavaScript bundlers and build tools (Rspack, Rsbuild, webpack, Vite, Rolldown, esbuild, Rollup, Parcel and Farm) for dev server startup time, build performance and bundle size for applications with different module sizes.

Metrics

Name Description
Startup (no cache) Time from starting the dev server to page loaded
Startup (with cache) Time from starting the dev server to page loaded with cache
HMR Time to HMR after changing a module
Build (no cache) Time taken to build the production bundles
Build (with cache) Time taken to build the production bundles with cache
Memory (RSS) Memory usage at the end of a cold start or production build
Output size Total size of the output bundle, minified with the default minifier
Gzipped size Gzipped size of the output bundle, represents actual network transfer size

Notes

  • Build target is set to es2022 (Chrome >= 93) for all tools.
  • Minification is enabled in production for all tools.
  • Source map is enabled in development and disabled in production for all tools.
  • Benchmarks run on GitHub Actions with variable hardware, which may cause inconsistent results.

Tooling details:

  • webpack is configured to use SWC instead of Babel / Terser.
  • Vite uses Rolldown and Oxc.

Results

Data from GitHub Actions: https://github.com/rstackjs/build-tools-performance/actions/runs/23903855579 (2026-04-02)


react-1k

A React app with 1,000 components and 1,500 modules from node_modules, using dynamic imports to simulate SPA.

CASE=react-1k pnpm benchmark

Development metrics:

Name Startup (no cache) Startup (with cache) HMR Memory (RSS)
Rspack CLI 2.0.0-rc.0 1608ms🥈 1094ms🥇 175ms 347MB🥈
Rsbuild 2.0.0-rc.0 1495ms🥇 1180ms🥉 174ms🥉 319MB🥇
Vite 8.0.3 6496ms 5237ms 104ms🥇 513MB🥉
webpack 5.105.4 5717ms 3502ms 609ms 852MB
Farm 1.7.11 1882ms🥉 1176ms🥈 130ms🥈 544MB
Parcel 2.16.4 5367ms 1541ms 437ms 1147MB

Build metrics:

Name Build (no cache) Build (with cache) Memory (RSS) Output size Gzipped size
Rspack CLI 2.0.0-rc.0 1076ms🥉 660ms🥇 275MB🥇 846.4kB🥉 222.1kB
Rsbuild 2.0.0-rc.0 997ms🥈 798ms🥈 283MB🥈 873.6kB 215.4kB🥇
Vite 8.0.3 914ms🥇 864ms🥉 300MB🥉 823.3kB🥇 217.9kB🥈
webpack 5.105.4 5363ms 1902ms 692MB 845.9kB🥈 221.7kB🥉
Farm 1.7.11 2308ms 1428ms 389MB 1089.1kB 258.4kB
Parcel 2.16.4 4958ms 1318ms 1086MB 965.6kB 230.9kB

react-5k

A React app with 5,000 components and 5,000 modules from node_modules, using dynamic imports to simulate SPA.

CASE=react-5k pnpm benchmark

Development metrics:

Name Startup (no cache) Startup (with cache) HMR Memory (RSS)
Rspack CLI 2.0.0-rc.0 1067ms🥈 966ms🥈 109ms🥇 282MB🥈
Rsbuild 2.0.0-rc.0 1042ms🥇 896ms🥇 136ms🥈 265MB🥇
Vite 8.0.3 5588ms 4460ms 137ms🥉 768MB
webpack 5.105.4 15925ms 10481ms 3456ms 1684MB
Farm 1.7.11 1540ms🥉 1127ms🥉 175ms 519MB🥉
Parcel 2.16.4 14981ms 3047ms 837ms 1745MB

Build metrics:

Name Build (no cache) Build (with cache) Memory (RSS) Output size Gzipped size
Rspack CLI 2.0.0-rc.0 2138ms🥈 1437ms🥈 594MB🥇 2825.8kB🥉 680.3kB🥈
Rsbuild 2.0.0-rc.0 2190ms🥉 1505ms🥉 610MB🥈 2852.4kB 680.3kB🥉
Vite 8.0.3 1560ms🥇 1391ms🥇 685MB 2630.3kB🥇 692.8kB
webpack 5.105.4 14343ms 4019ms 1227MB 2825.4kB🥈 679.3kB🥇
Farm 1.7.11 6842ms 2385ms 613MB🥉 3544.5kB 805.1kB
Parcel 2.16.4 11755ms 1984ms 2014MB 3489.0kB 766.5kB

react-10k

A React app with 10,000 components and 10,000 modules from node_modules, using dynamic imports to simulate SPA.

CASE=react-10k pnpm benchmark

Development metrics:

Name Startup (no cache) Startup (with cache) HMR Memory (RSS)
Rspack CLI 2.0.0-rc.0 1116ms🥈 1030ms🥈 127ms🥇 357MB🥈
Rsbuild 2.0.0-rc.0 1045ms🥇 920ms🥇 152ms🥈 322MB🥇
Vite 8.0.3 6639ms🥉 4098ms🥉 154ms🥉 1219MB🥉
webpack 5.105.4 19334ms 18977ms 2314ms 2191MB

Build metrics:

Name Build (no cache) Build (with cache) Memory (RSS) Output size Gzipped size
Rspack CLI 2.0.0-rc.0 3010ms🥈 2226ms🥉 1098MB🥇 5934.4kB🥉 1368.8kB🥉
Rsbuild 2.0.0-rc.0 3285ms🥉 1967ms🥈 1109MB🥈 5984.7kB 1367.7kB🥇
Vite 8.0.3 2034ms🥇 1805ms🥇 1244MB🥉 5465.1kB🥇 1417.0kB
webpack 5.105.4 29679ms 5916ms 1852MB 5934.0kB🥈 1368.0kB🥈

ui-components

A React app that imports UI components from several popular UI libraries.

Including @mui/material, @radix-ui/themes, antd, antd-mobile, @chakra-ui/react, @fluentui/react, @headlessui/react, @mantine/core, react-bootstrap, primereact, rsuite, @arco-design/web-react, @coreui/react, element-plus, ant-design-vue, naive-ui, primevue, vant, and vuetify.

CASE=ui-components pnpm benchmark

Build metrics:

Name Build (no cache) Build (with cache) Memory (RSS) Output size Gzipped size
Rspack CLI 2.0.0-rc.0 3014ms 1986ms🥈 645MB🥇 2376.6kB 682.0kB🥉
Rsbuild 2.0.0-rc.0 2933ms🥉 2430ms 714MB🥈 2188.1kB🥈 676.4kB🥇
Vite 8.0.3 2092ms🥇 2203ms 982MB🥉 2208.4kB🥉 683.9kB
webpack 5.105.4 22563ms 13181ms 1722MB 2184.5kB🥇 676.8kB🥈
esbuild 0.27.4 2692ms🥈 2038ms🥉 N/A 3095.1kB 942.9kB
Farm 1.7.11 11259ms 2815ms 1382MB 4128.5kB 1430.2kB
Parcel 2.16.4 17493ms 1834ms🥇 2105MB 2225.0kB 683.9kB

popular-libs

A browser app that imports a small number of live exports from 50 popular, modern frontend libraries to compare tree-shaking quality across bundlers.

It keeps the original React/Vue/state/data set and adds 30 more mainstream frontend packages with ESM-friendly entry points where practical, including axios, dayjs, clsx, tailwind-merge, class-variance-authority, i18next, react-i18next, vue-i18n, immer, swr, framer-motion, three, lucide-react, @headlessui/react, @headlessui/vue, @heroicons/react, @heroicons/vue, @radix-ui/react-slot, query-string, mitt, fuse.js, idb, dexie, ky, lit, xstate, preact, solid-js, swiper, and remeda.

CASE=popular-libs pnpm benchmark

Build metrics:

Name Build (no cache) Build (with cache) Memory (RSS) Output size Gzipped size
Rspack CLI 2.0.0-rc.0 1534ms 1590ms 441MB🥇 1768.4kB 551.9kB
Rsbuild 2.0.0-rc.0 1848ms 1416ms 455MB🥈 1767.5kB 551.6kB
Vite 8.0.3 1102ms🥉 1060ms🥉 655MB 1751.1kB🥈 550.0kB🥈
Rollup 4.60.1 6584ms 6359ms 1363MB 1592.0kB🥇 494.3kB🥇
Rolldown 1.0.0-rc.12 883ms🥈 899ms🥈 582MB🥉 1756.4kB🥉 550.4kB🥉
webpack 5.105.4 7933ms 1606ms 1354MB 1768.3kB 552.8kB
esbuild 0.27.4 659ms🥇 655ms🥇 N/A 2052.5kB 621.8kB
Farm 1.7.11 3116ms 1101ms 772MB 2231.9kB 755.8kB

rome

A complex TypeScript Node.js project that includes multiple packages from the rome toolchain.

CASE=rome pnpm benchmark

Build metrics:

Name Build (no cache) Build (with cache) Memory (RSS) Output size Gzipped size
Rspack CLI 2.0.0-rc.0 560ms🥉 470ms 235MB🥈 1007.8kB🥉 270.9kB🥉
Rsbuild 2.0.0-rc.0 606ms 467ms🥉 246MB🥉 1007.6kB🥈 270.8kB🥈
Rolldown 1.0.0-rc.12 306ms🥈 284ms🥈 230MB🥇 1012.2kB 271.8kB
webpack 5.105.4 2970ms 889ms 626MB 1006.0kB🥇 270.6kB🥇
esbuild 0.27.4 243ms🥇 244ms🥇 N/A 1025.2kB 276.7kB

Run locally

Run the benchmark.ts script to get the results (requires Node.js >= 22):

# Run the benchmark for the react-5k case
pnpm benchmark

# Run the benchmark for the react-10k case
CASE=react-10k pnpm benchmark

If you want to start the project with the specified tool, try:

pnpm i # install dependencies

# Cd to the case directory
cd cases/react-5k
cd cases/react-10k
cd cases/popular-libs

# Dev server
pnpm start:rspack # Start Rspack
pnpm start:rsbuild # Start Rsbuild
pnpm start:webpack # Start webpack
pnpm start:vite # Start Vite
pnpm start:farm # Start Farm

# Build
pnpm build:rspack # Build Rspack
pnpm build:rsbuild # Build Rsbuild
pnpm build:webpack # Build webpack
pnpm build:vite # Build Vite
pnpm build:farm # Build Farm

Options

Use CASE to switch the benchmark case:

CASE=react-1k pnpm benchmark
CASE=react-5k pnpm benchmark
CASE=react-10k pnpm benchmark
CASE=popular-libs pnpm benchmark

Use TOOLS to specify the build tools or bundlers:

# Run with all tools
TOOLS=all pnpm benchmark

# Run Rspack and Rsbuild
TOOLS=rspack,rsbuild pnpm benchmark

Use RUN_TIMES to specify the number of runs (defaults to 3):

RUN_TIMES=3 pnpm benchmark

Use WARMUP_TIMES to specify the number of warmup runs (defaults to 2):

WARMUP_TIMES=2 pnpm benchmark

Use FARM=true to run Farm:

FARM=true pnpm benchmark

Credits

Forked from farm-fe/performance-compare, thanks to the Farm team!

About

Benchmarks for bundlers and build tools, including Rspack, Rsbuild, webpack, Vite, Rolldown, esbuild, Parcel and Farm.

Topics

Resources

License

Stars

Watchers

Forks

Contributors