That’s why utilities like DiffUtil exist. In a recyclerView, it will calculate only what needs to be updated and only apply a patch to the view. Even if the calculation is itself heavy, you can run the diff calculation in the background and only apply the patch on the UI thread at the end. See https://github.com/googlesamples/android-architecture-components/blob/master/GithubBrowserSample/app/src/main/java/com/android/example/github/ui/common/DataBoundListAdapter.java#L77-L117
By the way, in my case, except I/O operations or unless there are performance issues, everything is in the UI thread by default in my implementations.