reason-reactify icon indicating copy to clipboard operation
reason-reactify copied to clipboard

Performance: Create benchmarks to examine / improve performance

Open bryphe opened this issue 5 years ago • 0 comments

Currently, we don't have any sort of benchmarks or timing data to validate the performance of this library. It's native and should be really fast - but it'd be helpful to have concrete data on how fast, what the limits are, etc.

Proposal:

  • We add some simple benchmarks around reconciliation. For example, some deeply nested tree of components where we repeatedly call reconcile. It would be helpful to profile both the timing and memory profile (allocations).
    • We should simulate cases where appendChild is very fast
    • We should simulate cases where appendChild is slow (ie, a thread sleep)
  • We add an automated test case that validates the performance - so we know if a change regresses performance. This timing data would be machine-dependent but if we keep benchmarks per CI environment, perhaps that would be enough to examine performance build-over-build. (this would helpful to have in general for the reason ecosystem!)

An excellent example of helpful benchmarking is the work @jordwalke did in his flex library: https://github.com/jordwalke/flex#benchmarking

bryphe avatar Dec 17 '18 20:12 bryphe