Written by Petr Baranov (P41081)
Repository contains implementation of performance measurements for 3 STM frameworks:
- redux
- mobx
- reatom These solutions was chosen because of their popularity or different approaches for state update.
There are 21 experiments (5 for redux, 8 for mobx, 8 for reatom) demonstrating performance measurements (for start update and done update in store) in:
- chart (with Vitory lib) (x-axis: start time; y-axis: spent time for update)
- timings in performance tab (devtools)
- console.log (for debug)
All experiments are divided by separate branches
-
redux/list
Application (redux) with list of 10 elements, being updated every 100ms
-
redux/list-long-op
Application (redux) with list of 10 elements, being updated every 100ms with long operation updating state every 500ms
-
redux/matrix
Application (redux) with matrix of 100x100 elements, being updated every 100ms
-
redux/matrix-200x200
Application (redux) with matrix of 200x200 elements, being updated every 100ms
-
redux/matrix-400x400
Application (redux) with matrix of 400x400 elements, being updated every 100ms
-
mobx/list
Application (mobx) with list of 10 elements, being updated every 100ms
-
mobx/list-long-op
Application (mobx) with list of 10 elements, being updated every 100ms with long operation updating state every 500ms
-
mobx/matrix
Application (mobx) with matrix of 100x100 elements, being updated every 100ms
-
mobx/matrix-200x200
Application (mobx) with matrix of 200x200 elements, being updated every 100ms
-
mobx/matrix-400x400
Application (mobx) with matrix of 400x400 elements, being updated every 100ms
-
mobx/matrix-substores
Application (mobx) with matrix of 100x100 elements and sub store for each element, being updated every 100ms
-
mobx/matrix-substores-200x200
Application (mobx) with matrix of 200x200 elements and sub store for each element, being updated every 100ms
-
mobx/matrix-substores-400x400
Application (mobx) with matrix of 400x400 elements and sub store for each element, being updated every 100ms
-
reatom/list
Application (reatom) with list of 10 elements, being updated every 100ms
- reatom/list-long-op
Application (reatom) with list of 10 elements, being updated every 100ms with long operation updating state every 500ms
- reatom/matrix
Application (reatom) with matrix of 100x100 elements, being updated every 100ms
- reatom/matrix-200x200
Application (reatom) with matrix of 200x200 elements, being updated every 100ms
-
reatom/matrix-400x400
Application (reatom) with matrix of 400x400 elements, being updated every 100ms
-
reatom/matrix-dynamic-atoms
Application (reatom) with matrix of 100x100 elements and dynamic atom declaration for each element, being updated every 100ms
-
reatom/matrix-dynamic-atoms-200x200
Application (reatom) with matrix of 200x200 elements and dynamic atom declaration for each element, being updated every 100ms
-
reatom/matrix-dynamic-atoms-400x400
Application (reatom) with matrix of 400x400 elements and dynamic atom declaration for each element, being updated every 100ms
To run in dev mode, you can choose needed branch with experiment, then open this project in terminal and type
for yarn users:
yarn && yarn dev
for npm:
npm i && npm run dev
To run in prod mode, you can choose needed branch with experiment, then open this project in terminal and type
for yarn users:
yarn && yarn prod
for npm:
npm i && npm run prod
open your browser and go to
Click on start button to start experiment, click on stop button to stop and collect measure.
Client application was developed with
- Create React App template
- victory library used for chart rendering
- written with typescript
Backend application developed with
- NodeJs
- express
- Socket.io for websockets transporting