Skip to content

Snabbdom upgrade

Athan Clark requested to merge athan.clark/Shpadoinkle:snabbdom-upgrade into master

The following performance enhancements were made to the snabbdom backend:

  • The call to fromProps has been omitted in favor of a nullary traverseWithKey_ specially made for Maps
  • Subtle changes to the format of the code - where conditions are performed, etc.

You can see the difference between the shpadoinkle-latest-snabbdom and shpadoinkle-latest-snabbdom-upgrade benchmarks below:

Screenshot_from_2021-02-25_18-06-39

Furthermore, the following potential performance enhancement was attempted, but proved to not provide speedup:

  • Attempt to append children in bulk to a DocumentFragment, with the append() function
  • Attempt to append children individually to a DocumentFragment, with the appendChild() function

Neither provided speedup - you can see the benchmarks between shpadoinkle-latest-pardiff and shpadoinkle-latest-pardiff-fragment below:

Screenshot_from_2021-02-25_17-28-28

Edited by Athan Clark

Merge request reports