fix: Infinite loop with grid rendering#1631
Merged
mofojed merged 2 commits intodeephaven:mainfrom Nov 9, 2023
Merged
Conversation
Member
mofojed
commented
Nov 9, 2023
- Caused by feat: Add ResizeObserver to Grid and Chart #1626
- The children on IrisGrid were getting re-rendered as a result of IrisGrid.handleViewChanged getting called after updating the canvas in Grid.componentDidUpdate
- Another fix would be to memoize metrics and not emit a view change if they are exactly the same as previous metrics, but thought that was a bigger change (need to deep equals a bunch of maps and arrays in the metrics)
- Tested by opening up a table with React dev tools highlighting re-renders. Table did not re-render when not being interacted with.
- Caused by deephaven#1626 - The children on IrisGrid were getting re-rendered as a result of IrisGrid.handleViewChanged getting called after updating the canvas in Grid.componentDidUpdate - Another fix would be to memoize metrics and not emit a view change if they are exactly the same as previous metrics, but thought that was a bigger change (need to deep equals a bunch of maps and arrays in the metrics) - Tested by opening up a table with React dev tools highlighting re-renders. Table did not re-render when not being interacted with.
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1631 +/- ##
==========================================
- Coverage 46.70% 46.66% -0.04%
==========================================
Files 589 591 +2
Lines 36355 36394 +39
Branches 9100 9108 +8
==========================================
+ Hits 16978 16984 +6
- Misses 19325 19358 +33
Partials 52 52
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
mattrunyon
requested changes
Nov 9, 2023
mattrunyon
approved these changes
Nov 9, 2023
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.