civictechdc / rfj_expungement

Tool for pro bono attorneys helping the Rising for Justice’s Expungement Clinic
MIT License
9 stars 23 forks source link

Input text fields are slow #59

Closed JimmyJay1985 closed 4 years ago

JimmyJay1985 commented 4 years ago

Seems like there is a delay if you're entering in a lot of characters.

Possible issues:

1) Updating after every keystroke is potentially too slow. 2) Potentially, a lot of the DOM is re-rendered when characters are entered. We can test this with logging statements or the react debugger from within chrome.

CharlesDLandau commented 4 years ago

This is the result of: https://github.com/codefordc/rfj_expungement/blob/c62389fe8f293c5d724b3fa061a0b7add51e61cf/contexts/casecontroller.js#L72-L77

JimmyJay1985 commented 4 years ago

Added changes for Eval Name to suppress state update for one second. Hopefully this can be used elsewhere in the application to improve performance.

CharlesDLandau commented 4 years ago

Closed by #62 and #69