Closed necolas closed 3 months ago
Comparison of minified (terser) and compressed (brotli) size results, measured in bytes. Smaller is better. | Results | Base | Patch | Ratio | |
---|---|---|---|---|---|
react-strict-dom/dist/dom/index.js | |||||
· compressed | 2,573 | 2,573 | 1.00 | ||
· minified | 8,823 | 8,823 | 1.00 | ||
react-strict-dom/dist/dom/runtime.js | |||||
· compressed | 836 | 836 | 1.00 | ||
· minified | 2,365 | 2,365 | 1.00 | ||
react-strict-dom/dist/native/index.js | |||||
· compressed | 14,653 | 14,786 | 1.01 | + | |
· minified | 53,100 | 53,563 | 1.01 | + |
Comparison of performance test results, measured in operations per second. Larger is better. | Results | Base | Patch | Ratio | |
---|---|---|---|---|---|
css.create | |||||
· small | 1,140,803 | 1,148,000 | 1.01 | + | |
· small with units | 454,305 | 449,542 | 0.99 | - | |
· small with variables | 683,041 | 691,056 | 1.01 | + | |
· several small | 325,776 | 333,311 | 1.02 | + | |
· large | 216,000 | 217,098 | 1.01 | + | |
· large with polyfills | 152,915 | 153,711 | 1.01 | + | |
· complex | 104,962 | 104,817 | 1.00 | - | |
· unsupported | 231,913 | 230,599 | 0.99 | - | |
css.createTheme | |||||
· simple theme | 224,680 | 225,392 | 1.00 | + | |
· polyfill theme | 210,473 | 211,694 | 1.01 | + | |
css.props | |||||
· small | 238,386 | 241,628 | 1.01 | + | |
· small with units | 188,893 | 189,439 | 1.00 | + | |
· small with variables | 104,621 | 105,307 | 1.01 | + | |
· small with variables of units | 74,341 | 75,213 | 1.01 | + | |
· large | 103,617 | 103,771 | 1.00 | + | |
· large with polyfills | 25,700 | 25,952 | 1.01 | + | |
· complex | 17,822 | 17,899 | 1.00 | + | |
· unsupported | 73,387 | 74,794 | 1.02 | + | |
· simple merge | 159,898 | 162,143 | 1.01 | + | |
· wide merge | 13,566 | 13,692 | 1.01 | + | |
· deep merge | 13,373 | 13,345 | 1.00 | - | |
· themed merge | 31,685 | 31,606 | 1.00 | - |
Consolidate logic for resolving global props into a new hook - useNativeProps.
Simply replicating the API patterns from web is not ideal for native, where we need to polyfill more complex behaviors like style inheritance. This diff starts the process of customizing the prop transforms to enable more optimizations.