Skip to content

Adopt Swift 6 + Concurrency + Drop background diffing support #157

@jessesquires

Description

@jessesquires
  • Adopt Swift 6
  • Support Concurrency
  • Remove background diffing

Maintaining CollectionViewDriverOptions.diffOnBackgroundQueue is too large of an effort for very little benefit. It was always questionable, and against guidance from the UIKit team.

See this blog post for more:

https://www.jessesquires.com/blog/2024/12/19/diffable-data-source-main-actor-inconsistency

From the UIKit team:

We have seen a number of issues stemming from usage of diffable data source on background queues/threads, and the performance benefits of doing this are generally minimal due to the fact that only the diffing of identifiers in the old & new snapshots happens on the background queue/thread; the work to set up and execute the Ul updates and animations for cells always happens on the main thread. Therefore, we made the decision to restrict diffable data source to the main actor when using Swift Concurrency, as this ensures correctness in all cases and is nearly always the best approach anyways. If you were previously applying snapshots from a background queue, we recommend you update your implementation to do so on the main queue instead.

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions