Closed aickin closed 7 years ago
This looks fantastic! One thing I was momentarily confused on was:
browserify-style function call that has non-numeric object indices shouldn't be optimized
I thought this referred to Browserify with the bundle-collapser
plugin vs without, but I tested manually and confirmed that both bundle-collapser
style and regular style are covered (i.e. parens are correctly added). I'll add some additional tests on the way in to make this clearer.
BTW just a quick remark that these PRs are incredibly thorough and well-written, and I'm extremely grateful that you're improving my little weekend project so much. 🙇 optimize-js is suddenly turning into a very nice general-purpose tool!
BTW just a quick remark that these PRs are incredibly thorough and well-written
Aw shucks, my pleasure. Thanks for accepting the PRs!
It seems this update is not included in the release v1.0.2 yet. (not avail via npm neither) Could you please check (and make it available if possible) Thank you!
PS: I tried it on a large browserify project and I had HUGE improvements!! Great work!
I'm going to work on a large rewrite of the benchmarks to include better stats, and then re-run them to ensure there are no regressions. Unfortunately I've been swamped, hence why this has sat for so long.
Fix for #29, trying to optimize browserify modules, in a very specific way.
This fix will optimize function expressions that are:
Added both positive and negative test cases. I did some basic testing against the PouchDB benchmark, and this PR makes it a lot faster.