Skip to content

remove mixin from createI13nNode and setupI13n

Choose a tag to compare

@kaesonho kaesonho released this 09 Feb 00:14
· 360 commits to master since this release

#134 - This refactor is for performance improvement, we realized that a React Component performs better without mixin, with the PR, we remove mixin from createI13nNode and setupI13n, if you are still using mixin, we will encourage you to use createI13nNode instead. We will still keep I13nMixin and I13nUtil until next major bump.

We also did some performance test, as below:

link-without-react-component x 131,232 ops/sec ±1.08% (82 runs sampled)
link-wrapped-with-react-component x 111,056 ops/sec ±1.55% (88 runs sampled)
link-wrapped-with-react-component-with-i13n-mixin x 54,357 ops/sec ±1.01% (79 runs sampled)
link-wrapped-with-react-component-with-i13n-high-order-component x 64,422 ops/sec ±1.95% (84 runs sampled)

it shows a higher order component performance better than a component with a mixin, however it also shows that we have some room to improve the rendering performance to get it closer to a pure tag, we will follow up this in the near future.