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

refactor(Grid): move setState outside of loops to avoid unnecessary redraws #583

Merged
merged 2 commits into from
Aug 28, 2023

Conversation

Delusoire
Copy link
Contributor

@Delusoire Delusoire commented Aug 27, 2023

The previous implementation was constantly re-rendering the Grid whenever a card was added, causing terrible performance. This PR aims to solve this by only redrawing once all cards are added.

@Delusoire Delusoire requested a review from a team as a code owner August 27, 2023 15:24
@Delusoire Delusoire requested review from theRealPadster and removed request for a team August 27, 2023 15:24
@Delusoire Delusoire changed the title Move setState outside of loops to avoid unnecessary redraws refactor(Grid): Move setState outside of loops to avoid unnecessary redraws Aug 27, 2023
@Delusoire Delusoire changed the title refactor(Grid): Move setState outside of loops to avoid unnecessary redraws refactor(Grid): move setState outside of loops to avoid unnecessary redraws Aug 27, 2023
Copy link
Member

@theRealPadster theRealPadster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, seems to be much faster now, thanks!

@theRealPadster theRealPadster merged commit bca9679 into spicetify:main Aug 28, 2023
5 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.

2 participants