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

perf: enhance rendering performance of SelectView #2690

Merged
merged 3 commits into from
May 27, 2024

Conversation

rogerleung0411
Copy link
Contributor

@rogerleung0411 rogerleung0411 commented May 22, 2024

Types of changes

  • New feature
  • Bug fix
  • Enhancement
  • Documentation change
  • Coding style change
  • Component style change
  • Refactoring
  • Test cases
  • Continuous integration
  • Typescript definition change
  • Breaking change
  • Others

Background and context

This PR mainly enhance the SelectView performance. Related issue: #2689

Solution

  1. memo tagsToShow
  2. break the for loop in tagsToShow memo callback (former in renderMultiple) as soon as possible.
  3. lastCloseableTagIndex calculation moved to onRemove callback

How is the change tested?

Changelog

Component Changelog(CN) Changelog(EN) Related issues
Select 优化 SelectView 渲染逻辑,避免选中多个结点时渲染卡顿 Enhance the rendering performance of SelectView fix #2689
InputTag 优化 InputTag 渲染逻辑,降低时间复杂度 reduce time complexity of InputTag

Checklist:

  • Test suite passes (npm run test)
  • Provide changelog for relevant changes (e.g. bug fixes and new features) if applicable.
  • Changes are submitted to the appropriate branch (e.g. features should be submitted to feature branch and others should be submitted to main branch)

Other information

Copy link

codesandbox bot commented May 22, 2024

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

Copy link

Prepare preview

Copy link

codesandbox-ci bot commented May 22, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@rogerleung0411
Copy link
Contributor Author

@yinkaihui Please review at your convenience. 🫡

@rogerleung0411
Copy link
Contributor Author

seems like the pipeline failed at deploy-site-preview check, is a rerun can help? @yinkaihui

@yinkaihui yinkaihui changed the base branch from main to feature-263 May 27, 2024 12:35
@yinkaihui yinkaihui added this to the 2.63.0 milestone May 27, 2024
@yinkaihui yinkaihui merged commit b6c87cd into arco-design:feature-263 May 27, 2024
7 of 8 checks passed
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.

Rendering performance issue of SelectView
2 participants