Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite editor using react-final-form #117

Merged
merged 4 commits into from
Jan 18, 2024
Merged

Rewrite editor using react-final-form #117

merged 4 commits into from
Jan 18, 2024

Conversation

PurkkaKoodari
Copy link
Member

Part of #25. The editor is currently egregiously slow. This is due to two things:

  • Previous code being written with little regard to performance (no useCallback & friends anywhere, just functions)
  • Our form library, Formik, rerendering every field every time something changes

This PR rewrites the editor with React Final Form. It basically eliminates most unnecessary rerendering of the forms and speeds up rerenders by like 30x when editing fields.

Some other library might've also worked, but Final Form seems to be written from the ground up so that it avoids unnecessary data dependencies.

Base automatically changed from fix/answer-semicolons to dev January 18, 2024 18:02
@PurkkaKoodari PurkkaKoodari merged commit 60d8a42 into dev Jan 18, 2024
1 check passed
@PurkkaKoodari PurkkaKoodari deleted the fix/editor-perf branch January 18, 2024 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants