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 treeview re-render #2833

Merged
merged 2 commits into from
Jul 18, 2023
Merged

Conversation

Aaaaash
Copy link
Member

@Aaaaash Aaaaash commented Jun 27, 2023

Types

  • 💄 Code Style Changes

Background or solution

🤖 Generated by Copilot at 3998ef5

Changelog

🤖 Generated by Copilot at 3998ef5

The pull request improves the performance of several components that use tree views by replacing state variables with ref variables. This avoids unnecessary re-rendering and state updates when the components are ready or loading. The affected components are extension-tree-view, file-tree, and scm-resource-tree.

@bytemain
Copy link
Member

看起来可以的,LGTM

减少 Re Render 次数

@codecov
Copy link

codecov bot commented Jun 27, 2023

Codecov Report

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

Comparison is base (462c7c0) 57.66% compared to head (dc1f1cb) 57.62%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2833      +/-   ##
==========================================
- Coverage   57.66%   57.62%   -0.05%     
==========================================
  Files        1336     1337       +1     
  Lines       83923    84123     +200     
  Branches    17455    17482      +27     
==========================================
+ Hits        48398    48479      +81     
- Misses      32288    32394     +106     
- Partials     3237     3250      +13     
Flag Coverage Δ
jsdom 52.64% <ø> (-0.06%) ⬇️
node 16.80% <ø> (+0.01%) ⬆️

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

see 72 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.

@erha19 erha19 merged commit d988f14 into main Jul 18, 2023
@erha19 erha19 deleted the chore/optimize-treeview-re-render branch July 18, 2023 10:03
Aaaaash added a commit that referenced this pull request Jul 26, 2023
Aaaaash added a commit that referenced this pull request Jul 26, 2023
Ricbet pushed a commit that referenced this pull request Jul 26, 2023
* Revert "chore: optimize treeview re-render (#2833)"

This reverts commit d988f14.

* chore: use local state

* chore: ci
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.

3 participants