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

Stop Wasted Renders When Typing Search #1877

Merged
merged 5 commits into from
Oct 18, 2021
Merged

Stop Wasted Renders When Typing Search #1877

merged 5 commits into from
Oct 18, 2021

Conversation

jameskerr
Copy link
Member

I noticed the search bar was responding very slowly when the app was in some states. I opened the react devtools and told it to highlight elements that re-render. Following the trail I was able to significantly improve performance by not needlessly rendering things.

Before

before

After

after

@jameskerr jameskerr requested a review from mason-fish October 6, 2021 23:37
I noticed the search bar was responding very slowly when the app
was in some states. I opened the react devtools and told it to
highlight elements that re-render. Following the trail I was able
to significatly improve performance by not needlessly rendering
things.
The state to props function is run even when the component is about
to unmount. This caused a bug where the component depends on the
pool being set. When it was unmounting, it was not.:wq
@mason-fish mason-fish merged commit f02fe32 into main Oct 18, 2021
@mason-fish mason-fish deleted the performance-fix branch October 18, 2021 17:04
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