Currently missing the [snabbdom](https://github.com/snabbdom/snabbdom) renderer; I'll get to it. ## Bundle Sizes Your mileage will vary. ### React ``` ┌────────────────────────────────────┐ │ │ │ Destination: dist/index.umd.js │ │ Bundle Size: 126.8 KB │ │ Minified Size: 113.27 KB │ │ Gzipped Size: 35.76 KB │ │ │ └────────────────────────────────────┘ ----------------------------- Rollup File Analysis ----------------------------- bundle size: 128.053 KB original size: 132.392 KB code reduction: 3.28 % module count: 30 ``` ### HyperHTML ``` ┌────────────────────────────────────┐ │ │ │ Destination: dist/index.umd.js │ │ Bundle Size: 69.44 KB │ │ Minified Size: 21.38 KB │ │ Gzipped Size: 8.24 KB │ │ │ └────────────────────────────────────┘ ----------------------------- Rollup File Analysis ----------------------------- bundle size: 66.381 KB original size: 76.633 KB code reduction: 13.38 % module count: 42 ``` ### Preact ``` ┌────────────────────────────────────┐ │ │ │ Destination: dist/index.umd.js │ │ Bundle Size: 32.8 KB │ │ Minified Size: 14.77 KB │ │ Gzipped Size: 5.36 KB │ │ │ └────────────────────────────────────┘ ----------------------------- Rollup File Analysis ----------------------------- bundle size: 31.397 KB original size: 34.905 KB code reduction: 10.05 % module count: 17 ``` ### LitHTML ``` ┌────────────────────────────────────┐ │ │ │ Destination: dist/index.umd.js │ │ Bundle Size: 51.27 KB │ │ Minified Size: 13.91 KB │ │ Gzipped Size: 4.66 KB │ │ │ └────────────────────────────────────┘ ----------------------------- Rollup File Analysis ----------------------------- bundle size: 49.604 KB original size: 58.474 KB code reduction: 15.17 % module count: 27 ``` ## Next Steps - Add [snabbdom](https://github.com/snabbdom/snabbdom) and maybe a [mustache](https://mustache.github.io/) option. - Build for last 2 versions of supported browsers (not just Chrome) and use the polyfills. - Profile of baseline parse time, compile time, and memory usage with the "Hello, World" examples. - Do some profiling around numerous Web Component instances on a page. - Address known bugs with polyfills and AngularJS, possibly by avoiding Shadow DOM until it gets sorted by fix or time. ## Takeaways So Far Before looking at these first four renderer options, I expected [LitHTML](https://github.com/Polymer/lit-html) or [HyperHTML](https://github.com/WebReflection/hyperHTML) to have the leanest build results. [Preact](https://github.com/developit/preact) ended up beating HyperHTML. In comparison, [React](https://github.com/facebook/react) was **7.67 times** as large as LitHTML and **6.67 times** as large as LitHTML. That difference in gzip size is not decisively significant given that time to transfer 35.76kb on a 3G network is still under a second (_though, remember: that's on paper vs real life conditions and 300ms is a perceptible delay_), but JS bundle size isn't only an issue over the network, it's also an issue once it arrives. The relationship between parse and compile time are non-linear with JS bundle size, but the relationship _does_ exist and AFAIK is based on the _unzipped_ file size (in this case, of 113.27kb for React vs 14.77kb for Preact). I suspect there might be ways to cut the size of both the React and HyperHTML builds, but I think it's a data point to consider that this is what I ended up with by spending roughly the same amount of time and attention on each setup.