nextcloud / nextcloud/android

Implement DiffUtil for OCFileListAdapter

Open
#13,616 0 comments 0 reactions 1 assignee Claimed by @alperozturk96 View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.