Refactor: improve perf by 2.5x with reduced memory and bundle size
Published on October 26, 2019 by Jun Yang
Admin

By removing await/async keywords for internal function calls, we removed redundent async/sync implementations (see: https://github.com/harttle/liquidjs/issues/164) thus reduced bundle size, and improved performance (both ops/sec and mem used) considerably. In summary, on MacBook 11,1 (2.4 GHz Core i5, 8G RAM) the improvements are:

  1. ops/sec for typical use cases improved by x2.5 (see above)
  2. memory usage reduced by 2/2 (see above)
  3. size of liquidjs.min.js reduced by 14% (50k -> 43k)

See https://github.com/harttle/liquidjs/pull/166 for details.