Refactor state flow to boost performance

For intervals < ~24ms, the main thread as unable to cope up in handling
worker responses due to Mainframe rendering on each execution. To
resolve this, this commit delegates all execution-time states to child
components, controlled imperatively from Mainframe.

This yields huge performance boost, with main thread keeping up with
worker responses even at interval of 5ms.
This commit is contained in:
Nilay Majorwar
2021-12-17 15:05:28 +05:30
parent d838366023
commit febe31a3d8
5 changed files with 97 additions and 46 deletions

View File

@@ -33,9 +33,9 @@ const IntervalInput = (props: {
return (
<div style={styles.inputWrapper}>
<NumericInput
min={20}
min={5}
stepSize={5}
defaultValue={20}
stepSize={10}
minorStepSize={null}
leftIcon="time"
clampValueOnBlur