Implement DiffUtil for OCFileListAdapter
Open
enhancement
performance 🚀
- Dominant language
- Kotlin
- Stars
- 5.6k
- Forks
- 2k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 92
Description
[DiffUtil](https://developer.android.com/reference/androidx/recyclerview/widget/DiffUtil) is a utility class that calculates the difference between two lists and outputs a list of update operations that converts the first list into the second one.
Using notifyDataSetChanged() in RecyclerView doesn’t let it track the exact changes. As a result, all visible views are needlessly rebuilt, which is inefficient and time-consuming.
By using DiffUtil, we can compare the old and new lists more efficiently. This way, only the specific items that have changed are updated, avoiding the full rebuild.
Contributor guide
Assessment
This issue has not been assessed yet.