optimize-js 1.0.3 is out, with improvements for Browserify and Webpack 1 by @xander76, and more accurate benchmarks:http://github.com/nolanlawson/optimize-js …
-
-
I also had to figure out a way to exclude the network time and browser caching of parsed code, more details here:https://github.com/nolanlawson/optimize-js/issues/37#issuecomment-270583578 …
-
The new benchmarks show optimize-js still provides a perf boost in Chrome, Edge, and Firefox, but Safari is basically a wash:pic.twitter.com/xBkf6KOgmC
-
BTW as always, please don't use optimize-js without testing it on *your* codebase and target browsers. It's not magic performance dust.

-
-
-
@nolanlawson and maybe some prove of that? -
@macsikora You can confirm using performance.mark()/measure() and DevTools. Quick example: http://bl.ocks.org/nolanlawson/990dae2feb36669e8d8f39fa20e40e05 …pic.twitter.com/4Asw3uRWAx
-
@macsikora Getting it to exclude network/cached-parse time is trickier, but I have a link in the thread about how to do that.
-
-
-
@nolanlawson What about throwing in a setTimeout() to mark the end? Will that capture correctly? -
@bramus The end is not the difficult part to capture; it's the beginning. :) setTimeout isn't necessary. -
@bramus Ah wait I see what mean. Yeah, that second script boundary is not strictly necessary. -
@nolanlawson@bramus So why is the first one necessary? -
@baaz@nolanlawson@bramus the parsing delay happens before the script is executed, so you can't capture it from inside the same script
-
-
-
@nolanlawson thanks for finding a way to fix the measurement, and for publicizing the knowledge! -
@xander76 Thank you for raising the issue about the accuracy. :) It's important to be meticulous with this stuff!
-
-
-
@nolanlawson Can you point me to a resource explaining this? :) -
@stefanjudis Basically the browser starts parsing well before that first mark, see https://github.com/nolanlawson/optimize-js/issues/37 … and:https://twitter.com/nolanlawson/status/817115368040763392 …
-
@nolanlawson Great. Thanks. :)
-
-
@nolanlawson@dan_abramov makes sense tho.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.