-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Poor performance while editing large files #2009
Comments
Calling |
@sondrele did you ever find a solution for this? |
@erquhart would you be able to point me in the right direction in the repo and I will try and fix |
The proper fix here is pretty deep in the CMS - I'm expecting we'll start having all widgets maintain their own state - propagating changes up, but not receiving their value through props. This is effectively happening for some widgets, like markdown and list, but values are still passed down the tree and have to be read and run through This needs proper planning between the implementer(s) and maintainers , so that's the first step if you're interested in digging in. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Closing this in favour of #3415 |
this is still happening I wouldn't have closed it, neither this one or #3415 seems to be fixed, my project needs a massive refactor for working around this putting each entry in its own file, when can we expect a fix please? |
Describe the bug
I have a file with a bunch of messages, the model is essentially the same config as for the authors in the netlify-cms
dev-test
.While editing a message, the performance is very poor and results in a very janky UI.
I'm assuming this is due to the
onChange
handler being called on every edit, which results in validation, and re-rendring of the entire component tree (please correct me if I'm wrong, I do not have a good overview of the internals innetlify-cms
).If my assumption is (somewhat) correct I propose storing the values while editing locally in the widgets instead of calling the
onChange
handler on every event, and only call theonChange
handler in anonBlur
handler instead.To Reproduce
The easiest way to reproduce is to start the
dev-test
locally with a lot of authors manually configured:yarn && yarn develop
Expected behavior
Editing content should not have that kind of performance problems.
Screenshots
I've included a gif of what it looks like when writing. Not sure how obvious it is from the video, but I can testify that I'm hitting the keys way faster than the characters appear :)
Applicable Versions:
CMS configuration
Here: https://github.com/sondrele/netlify-cms/blob/master/dev-test/config.yml
Authors data: https://github.com/sondrele/netlify-cms/blob/master/dev-test/index.html#L42
Additional context
The text was updated successfully, but these errors were encountered: