duojs / duo

A next-generation package manager for the front-end
3.42k stars 117 forks source link

Performance compared to webpack? #318

Open markreg opened 10 years ago

markreg commented 10 years ago

How does duo compare to webpack in terms of performance e.g. async-loading, etc.? What is duo recommended for vs. webpack? Thanks!

matthewmueller commented 10 years ago

haven't done benchmarks between the two. I'd love for someone to give that a go if they have a chance.

markreg commented 10 years ago

Does duo support async module loading or is there a way to manually do it if not?

sankargorthi commented 10 years ago

@markreg I use a fork of lazyload to achieve async module loading as i lazy load js and css assets with it. An alternative would be great.

matthewmueller commented 10 years ago

@markreg there's no async module loading support right now.

I've worked with both async loading systems (YUI, Head.js, etc.) and bundles. From my experience, async loading introduces more issues than gains. I tend to prefer small, focused bundles for each page. Depends on the app size though too. Facebook, Yahoo, Google all require some form of lazy loading.

Not sure about the webpack integration, but you could also expose the builds and then use something like head.js to load them asynchronously. Duo builds scripts that you can just include on the page, without any additional work.

markreg commented 10 years ago

So there would be separate duo builds for each url and each js/css asset bundle would be loaded from cache/http when the client router emits a change event?

ghost commented 8 years ago

Excuse me, but, how webpack and duo can be compared?

First is module bundler, second is package manager.

At first duo should download all dependencies and after webpack processes - separates for production use?

Or I am wrong?