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

Feature/improve refactored global search performance #317

Merged
merged 5 commits into from
May 23, 2023
Merged

Feature/improve refactored global search performance #317

merged 5 commits into from
May 23, 2023

Conversation

schroda
Copy link
Collaborator

@schroda schroda commented May 23, 2023

No description provided.

schroda added 5 commits May 23, 2023 13:27
Preparation for reducing re-renders.
Each "SourceSearchPreview" component would re-render at each key press.
Only re-render in case the "searchString" (or other props) changed.
Due to the query the components rendered everytime a key was pressed in the search field
Do not wait for the debounced "searchString" in case it will be an empty string anyways
In case many sources are being searched, the outdated requests can block the new ones.
To prevent this, the old ones will get canceled.
In case multiple search requests are finished in short succession, each state update would trigger an update.
By debouncing these updates, the search results do not "jump around" as much, since the sources get sorted by search request state and result
@schroda schroda merged commit c32cb53 into Suwayomi:master May 23, 2023
@schroda schroda deleted the feature/improve_refactored_global_search_performance branch May 23, 2023 11:35
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.

1 participant