Switching "deep-equal" package for "fast-deep-equal". #1665
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description / Motivation
We were noticing that
deepEqual
incomponentDidUpdate
ofSitecoreContext
was taking up a significant chunk of time for large Layout Service payloads.The package "fast-deep-equal" shows 100x faster performance in benchmarks compared to "deep-equal".
This was the only usage of the "deep-equal" package, so we were able to replace the dependency entirely.
Testing Details
There is no functional change, only performance change, so no new unit tests. We have implemented this change on 2 different projects and have not seen any issues, just faster performance.
In our Lighthouse tests for one of our projects, we saw the Total Blocking Time reduced from 1090ms to 20ms in Desktop, and from 5170ms to 330ms in mobile. The results were reproducible, and we saw significant gains in a different project.
Types of changes
Not technically a bug, but it's not new functionality either.