parcel-bundler / parcel

The zero configuration build tool for the web. 📦🚀
https://parceljs.org
MIT License
43.4k stars 2.26k forks source link

Link to the "reasonably sized app, containing 1726 modules, 6.5M uncompressed" #2654

Closed tolmasky closed 5 years ago

tolmasky commented 5 years ago

Is there a link to the "reasonably sized app, containing 1726 modules, 6.5M uncompressed."? Would like to run some comparisons and would prefer to use whatever you consider in your own benchmarks.

DeMoorJasper commented 5 years ago

It's a closed source app.

Would be great to have a large scale open source application that uses standard JS and various other asset types so it could be compiled with various bundlers for somewhat realistic benchmarks.

However it's pretty much impossible to benchmark/compare bundlers reliably.

tolmasky commented 5 years ago

I have some interest in potentially putting together a "standard" app to use for benchmarking, so that perhaps you could target it in CI and keep the page transparently up-to-date? Would you mind sharing a few details used for this closed source app to help me put together something reasonable? Specifically:

  1. I assume "6.5M uncompressed" refers to the size of a single generated javascript bundle in the setup.
  2. 1726 refers to the full module tree (not 1726 top-level packages). Also, is this in a deduped (yarn-style) setup? Or are there potentially multiple duplicate copies of the module in the tree.
  3. Are the 1726 modules run through the full set of transformation themselves, or are they merely concatenated/minified?
  4. Generally speaking, if the configs for browserify, webpack, and parcel could be provided, that would be fantastic.
  5. As a separate request, and certainly understandable if not possible, but if at least the dependencies of the benchmark could be provided, that would help me generate a benchmark that matches the existing referenced one.

At the end of the day, I'd like to get as close as possible to generating something that matches the "results" of the one on the website, as I imagine that is something that would be uncontroversial results-wise.

devongovett commented 5 years ago

In general, this wasn't meant to be a "benchmark" per se, but an example of the kind of performance characteristics you might be able to expect. That said, an actual benchmark might be useful. I think any sort of large app which makes use of modern web app tooling like babel, etc. would work.

The app in question is an app I worked on in a previous job.

  1. Yes. This app did not have any code splitting.
  2. Yep, 1726 unique files in the app, including local app files and actually used files from node_modules.
  3. The transformation depends on the file. For example, the application used babel for its local packages, but babel is not applied to node_modules.
  4. I'm not sure I have those anymore, but I can check.
  5. There are a lot of dependencies, both internal and external, so I'm not sure how useful it would really be. Common JS libraries like react, lodash, etc., but also a lot of internal libraries.
devongovett commented 5 years ago

Also, to be fair, I think the results of the example are pretty outdated at this point since I haven't updated them since the initial parcel release over a year ago. So that would be Parcel 1.0, Webpack 3 (maybe?), and whatever Browserify version was around at that time. I'm sure the results would be different if measured today.

tolmasky commented 5 years ago

Yeah, that's one of the things I'd like to attack (again, no promises on actually accomplishing this goal). My general impression is it would be nice to have a TodoMVC of bundling, in the sense of getting some sort of feeling as to what particular areas are being optimized (size, vs. speed, vs. refresh likelihood like we discussed on twitter a few days ago). I've certainly run into many issues that are difficult to explain without "hey look at my app" -- so it would be nice to be able to make the example extensible. Additionally, having something akin to an "integration" test for performance, vs. "unit test" style individual metrics, would be nice.

devongovett commented 5 years ago

Sounds good. One app I've seen before that tried to accomplish some of those goals is https://github.com/gothinkster/realworld. Not sure if you've seen it.

Going to close this issue since it isn't really an issue with Parcel. But feel free to start a thread on Spectrum for further discussion.