-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use lodahs's "fp/set" instead of "cloneDeep" to increase performance for data updates, especially for larger models. Previously JSON Forms used lodash's "cloneDeep" to create a copy of the current data and then update the relevant parts. This has the benefit of being a guaranteed immutable update, however it's an expensive process and hinders using shallow compare on data objects which were not touched. We now use "fp/set" as a compromise: It will create new objects for all elements directly containing the updated data, while leaving sibling elements alone. This increases performance a lot while still triggering updates for the changed objects.
- Loading branch information
1 parent
29595e6
commit 83ec3d8
Showing
2 changed files
with
44 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters