-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Discover] Optimize checking for multifields during grid rendering (#…
…145698) A follow up for #144672 (issue #144673) ## Summary This PR reduces number of iterations through fields array by simplifying the logic and switching to `Map` and `.get()` instead of using `.includes()` on a visible fields array for each rendered field. Also `shouldShowFieldHandler` can be further improved in the future without the need to refactor how it's being used. Before: <img width="1490" alt="Screenshot 2022-11-21 at 19 36 17" src="https://user-images.githubusercontent.com/1415710/203134749-190df445-f0dc-4a66-8797-21fedc1345d2.png"> <img width="430" alt="Screenshot 2022-11-21 at 19 36 43" src="https://user-images.githubusercontent.com/1415710/203134792-06b659cd-b4e0-4248-b1b2-63767528738b.png"> <img width="406" alt="Screenshot 2022-11-21 at 19 39 05" src="https://user-images.githubusercontent.com/1415710/203134836-2881e4bf-a9be-4a12-bcd5-76074d3ae0d3.png"> After: <img width="1493" alt="Screenshot 2022-11-21 at 19 42 48" src="https://user-images.githubusercontent.com/1415710/203134864-9d686705-891f-4640-96e6-29e7af5ae9d9.png"> <img width="496" alt="Screenshot 2022-11-21 at 19 44 54" src="https://user-images.githubusercontent.com/1415710/203135114-fda20375-fd3f-4ab4-b3e5-cdf7758ca3c8.png"> <img width="370" alt="Screenshot 2022-11-21 at 19 44 32" src="https://user-images.githubusercontent.com/1415710/203135038-c4fd40b7-1c8a-43a3-b08c-c4c19c74743f.png">
- Loading branch information
Showing
14 changed files
with
149 additions
and
108 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
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
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
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
Oops, something went wrong.