fix(react-components): optimize styled node collection diff check on re-render #3753
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.
Type of change
Jira ticket 📘
https://cognitedata.atlassian.net/browse/
Description 📝
Optimize style-difference check. This severely hampered performance on model
in 3d-test. This is likely due to the large number of mapped equipment.
Essentially, this optimization ensures index sets are not reconstructed unnecessarily, but stored properly from when edges are constructed.
Update: It seems like I (using Firefox on Linux) am the only one having these severe performance problems. I'm adding a video to document what the experience is at my end:
slow_click.mp4
How has this been tested? 🔍
In FDX locally.
Test instructions ℹ️
Open https://apps.cognite.com/explore/FDX_Boys/fdx-boys/2/Equipment/fdx-boys/Gokhan-2878543855731702-IAA?aiSearch=false&viewMode=3d and notice how clicks on Ivar Aasen (the oil platform) are sort-of slow.
Use this PR in FDX locally, and see how clicks are notably faster.
Checklist ☑️