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

How to disable differ/ enable executing forceListOverride(list) publicly #1363

Open
tsuellow opened this issue Sep 6, 2023 · 0 comments
Open

Comments

@tsuellow
Copy link

tsuellow commented Sep 6, 2023

I am currently having issues when filtering a large list of items (aprox. 10000) through a searchterm on a Recyclerview. On startup the large list loads relatively quickly but when starting the filtering via searchString the differ + animations takes too long and make the app janky and even unresponsive at times. Disabling animations has already helped with the unresponsiveness but the differ calculations are performed regardless and make the recyclerView slow when it comes to rendering the filtered list ( I already verified that it is not the filtering itself that causes the lag). This improves significantly when the filtered list reduces in size as the searchterm becomes more specific but it becomes slow again as I reduce the search term specificity and the list grows again.
I would like to disable, both animations and the differ calculations when the list of items is above a certain threshold and ideally reenable them once the filtering has reduced the list to a manageable size. I have found some methods that look like they could help me achieve this, like forceListOverride(list) found in the async differ class but they are private. I think it would make sense to forfeit the differ calculations entirely whenever animations are disabled

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

No branches or pull requests

1 participant