Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial benchmark to compare against babel-loader based approach #13

Closed
bebraw opened this issue Jul 24, 2020 · 10 comments
Closed

Add initial benchmark to compare against babel-loader based approach #13

bebraw opened this issue Jul 24, 2020 · 10 comments

Comments

@bebraw
Copy link

bebraw commented Jul 24, 2020

It would be cool to see the impact against babel-loader. I wonder if there's some open source project that could be used for figuring out the performance difference. Also pros/cons would be good to understand. At least we would lose any Babel plugins with esbuild but that's not a big deal for some projects.

@Nickhoyer
Copy link

The improvement in my project has been around 45 sec build time -> 6 sec build time in github actions, going from babel-loader to esbuild-loader

@egoist egoist pinned this issue Aug 3, 2020
@bebraw
Copy link
Author

bebraw commented Aug 3, 2020

@Nickhoyer That's impressive!

@privatenumber
Copy link
Owner

privatenumber commented Aug 23, 2020

I took minification benchmarks here:
https://github.com/privatenumber/minification-benchmarks

In a proprietary codebase I have access to, it reduces build-time by 2~3min (7m → 4m) by replacing babel-loader and Terser with esbuild.

If you know of any large public codebases that transpiles using babel-loader and has a pretty minimal Webpack config, let me know and I can test there. I tried it on vue-hackernews-2.0 but the codebase is too small and was seeing only about a 1s difference (7s → 6s).


We can also make an issue/PR to add a esbuild option to Vue CLI that uses this.

@josteph
Copy link

josteph commented Dec 30, 2020

Sharing my result on one of my CRA based, medium sized project.

Before
image

After
image

Tested on:
CPU 2,3 GHz Intel Core i5
RAM 16 GB 2133 MHz LPDDR3

Though it could benefit more in a slower machine.

@khasky
Copy link

khasky commented Jan 14, 2021

Not related to babel, but my results for medium-sized project with bundle size of 6MB are:

  • Parcel 1.x ~ 50-70s
  • Webpack + esbuild-loader ~ 13s

@przemuh
Copy link

przemuh commented Jan 26, 2021

In my case:

babel-loader + thread-loader - 87s
esbuild-loader - 42s

@fkhadra
Copy link

fkhadra commented Feb 13, 2021

In my case, bundle size of 15MB(yes huge...). CRA ejected config

  • babel: ~190 sec (cold start no cache), 90 sec with the cache
  • esbuild-loader: ~55 sec

dev-build

@s-kris
Copy link

s-kris commented Mar 1, 2021

My nextjs project's build time went from 150s to 70s

@pavelloz

This comment has been minimized.

@privatenumber

This comment has been minimized.

Repository owner locked and limited conversation to collaborators Mar 28, 2021
@privatenumber privatenumber unpinned this issue Mar 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants