Skip to content

Instantly share code, notes, and snippets.

@juliangruber
Created November 6, 2013 14:57
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save juliangruber/7337388 to your computer and use it in GitHub Desktop.
Save juliangruber/7337388 to your computer and use it in GitHub Desktop.
browserify bundling tests
# simple bundle
$ time browserify --debug lib/boot/index.js | wc -c
1397809
real 0m1.726s
user 0m1.540s
sys 0m0.139s
# bundle without node_modules
$ time browserify --debug $(find node_modules/* -maxdepth 0 | sed -e 's/node_modules\//-x /g') lib/boot/index.js | wc -c
203418
real 0m0.748s
user 0m0.688s
sys 0m0.098s
# bundle only node_modules
$ time browserify $(browserify --list lib/boot/index.js | grep node_modules | grep -v node_modules/browserify | perl -pe 's|.*?node_modules/([^/]*)/.+$|-r \1 node_modules/\1|g' | sort | uniq) | wc -c
480493
real 0m2.477s
user 0m2.340s
sys 0m0.243s
@seidtgeist
Copy link

That's excellent. Quick, npm it before it rots!

@juliangruber
Copy link
Author

@ehd you're free to do so :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment