GitXplorerGitXplorer
m

hoc-benchmark

public
5 stars
2 forks
0 issues

Commits

List of commits on branch master.
Verified
7d698380cde522dc763a4499fd37af5072002001

Cleanup

mmxstbr committed 7 years ago
Verified
ac8bf062b4bcd8eac084ad8c03daec8b5b7ee3e6

Update README.md

mmxstbr committed 7 years ago
Verified
850b48efc9deb2174690a8ccd44fbbbe0abe6870

Update README.md

mmxstbr committed 7 years ago
Unverified
1a88daff46783a5ffd1f2d787992e7985d5b0d56

Fix benchmarks

mmxstbr committed 8 years ago
Unverified
fe76f9a26a81f92961bfbb4938993e8fce3a5721

Cleanup the code

mmxstbr committed 8 years ago
Unverified
38e4416fdc81159eb0c398e96ca18e8310f010f9

Initial commit

mmxstbr committed 8 years ago

README

The README file for this repository.

React.js higher-order component benchmark

This is a benchmark to test the performance impact of having higher-order components. The benchmark renders 10,000 buttons with different children, once wrapped in a HoC and once not wrapped in an HoC. (depending on which button you press)

This project was bootstrapped with Create React App.

Setup

npm i -g serve
git clone https://github.com/mxstbr/hoc-benchmark
cd hoc-benchmark
yarn install    # or npm install
yarn run build
serve build/

Running the benchmarks

Open the URL serve outputs in your browser of choice and click either of the two buttons presented to you. The time it took to render the page will be logged to the console.

Make sure to press both buttons a bunch of times to get a feel for the results as they vary wildly. Also don't forget to do it in multiple browser and across multiple page refreshes.

License

This repository is licensed under the MIT License, Copyright ©️ 2017 Maximilian Stoiber.