Skip to content

Instantly share code, notes, and snippets.

@alex35mil
Created October 3, 2016 12:35
Show Gist options
  • Save alex35mil/4eeb338abc2b0a6e422b14713b9dff1f to your computer and use it in GitHub Desktop.
Save alex35mil/4eeb338abc2b0a6e422b14713b9dff1f to your computer and use it in GitHub Desktop.

toJS perf check

[ DEMO ]

  • Form state is in the redux store
  • I removed all toJS calls from selectors, so components deal w/ immutable objects
  • Perf.start triggered on form state update (w/ value 1)
  • Perf.stop — when this update is flushed to the DOM

Numbers from gif

W/  `toJS`: 259 301 446 335
W/o `toJS`: 386 407 382 479

I played a lot more w/ this, but haven't noticed significant difference in numbers, as well as how it feels from the user perspective (haven't checked w/ math tho, e.g. statistical significance).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment