Giter VIP home page Giter VIP logo

Comments (7)

evanw avatar evanw commented on April 28, 2024

My benchmark is only for full production builds. One of my main reasons for creating esbuild in the first place is to demonstrate that production builds don't have to be slow and to encourage existing bundlers to have faster production builds.

I'm not worried about the speed of development builds. It's easy to make development builds fast because you don't need to transform the source code much. In some cases you don't need a bundler during development at all since browsers now support ES6 modules natively. This is the case in my benchmark, for example.

It's great that you're working on a faster compiler! That's really exciting. However, I tried out [email protected] using the production settings you described and the output is 9.8mb. This is much bigger than the previous size using fuse-box@next (6.5mb) which itself is much bigger than the output of all other bundlers (~5.9mb). It looks like this is because [email protected] does not minify the output beyond removing whitespace. I don't consider this a production build on its own because you would need to run it through a minifier before using it in production.

Also the generated output is not valid JavaScript, so this doesn't count as a successful build for my benchmark:

bench/three/fusebox/dist/app.js:35:2761: error: Expected ";" but found "Object"
...ject.assign(exports, __fusereq(4))Object.assign(exports, __fusereq(50))var...
                                     ~~~~~~

I'm happy to update the version of FuseBox used in my benchmark when you have a new version that meets the requirements of the benchmark.

from esbuild.

nchanged avatar nchanged commented on April 28, 2024

@evanw fair enough. I will make sure it runs and minifies it, then we will update the bench. Thanks.

from esbuild.

evanw avatar evanw commented on April 28, 2024

I just updated the versions of all packages used in the benchmark and it looks like the latest version of fuse-box@next pretty much passes my tests for a valid benchmark entry. So I included it and I'm considering this issue fixed. The only caveat I found as far as correctness was that the line numbers for the source map generated by fuse-box seem to be off by one. And with the update, fuse-box is no longer the slowest bundler in my benchmark! It's great to see these performance improvements.

from esbuild.

nchanged avatar nchanged commented on April 28, 2024

Thanks! I will check what's wrong. Terser spoils the picture, it takes the longest time.

But in the long run, I am myself considering doing some magic with GO. It would be really cool to use your minifier! Do you have any plans on splitting it into packages ? Like parser, printer, minifier ?

from esbuild.

evanw avatar evanw commented on April 28, 2024

Do you have any plans on splitting it into packages ? Like parser, printer, minifier ?

I don't have any plans to do that at the moment. However, I do have a JavaScript API for transforming code using esbuild. It can be used to minify code if you pass minify: true.

from esbuild.

nchanged avatar nchanged commented on April 28, 2024

Cool, thanks for that! But I was mainly interested in the GO part. Node.Js Is a Christmas toy compared to GO.

from esbuild.

jpike88 avatar jpike88 commented on April 28, 2024

@evanw is a basic, minimal go api ever going to be possible?

from esbuild.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.