Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: optimize split panel re-render #2851

Merged
merged 1 commit into from
Jun 28, 2023

Conversation

Aaaaash
Copy link
Member

@Aaaaash Aaaaash commented Jun 28, 2023

Types

  • 💄 Code Style Changes

Background or solution

🤖 Generated by Copilot at f1edb85

  • Wrap childList with React.useMemo to improve performance and avoid mutation (link)
  • Replace elements with a React.useMemo hook that returns a nested array of JSX elements (link)
  • Filter out falsy values from elements before rendering (link)

Changelog

🤖 Generated by Copilot at f1edb85

This pull request improves the split panel component in core-browser by using memoization and filtering techniques to avoid unnecessary re-rendering and handle edge cases. This makes the component faster, cleaner, and more reliable.

@Aaaaash Aaaaash force-pushed the chore/optimize-split-panel-re-render branch from f1edb85 to 29a8c28 Compare June 28, 2023 07:38
@codecov
Copy link

codecov bot commented Jun 28, 2023

Codecov Report

Patch coverage has no change and project coverage change: -0.02 ⚠️

Comparison is base (462c7c0) 57.66% compared to head (29a8c28) 57.65%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2851      +/-   ##
==========================================
- Coverage   57.66%   57.65%   -0.02%     
==========================================
  Files        1336     1336              
  Lines       83923    83949      +26     
  Branches    17455    17456       +1     
==========================================
+ Hits        48398    48402       +4     
- Misses      32288    32311      +23     
+ Partials     3237     3236       -1     
Flag Coverage Δ
jsdom 52.68% <ø> (-0.02%) ⬇️
node 16.78% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

see 7 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@bytemain bytemain merged commit d89e8bf into main Jun 28, 2023
12 checks passed
@bytemain bytemain deleted the chore/optimize-split-panel-re-render branch June 28, 2023 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants