A Swift library for fast diffing between two collections, providing edit steps to animate UITableView and UICollectionView updates.
DeepDiff is a Swift library that computes the differences between two collections (like arrays) and returns the changes as edit steps—insertions, deletions, replacements, and moves. It solves the problem of efficiently updating UITableView and UICollectionView by providing the exact changes needed to animate data updates smoothly and correctly.
iOS and macOS developers building apps with complex, dynamic lists or collections that require performant and animated data updates.
Developers choose DeepDiff for its linear-time Heckel algorithm, which handles large datasets efficiently, and its seamless integration with UIKit's batch update system, ensuring safe and synchronized UI animations.
🦀Amazingly incredible extraordinary lightning fast diffing in Swift
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Uses the Heckel algorithm for O(n) diffing, enabling efficient handling of large collections as shown in benchmarks with over 10,000 items.
Requires models to implement DiffAware with diffId and compareContent, ensuring compile-time safety and accurate change detection for replacements.
Returns changes compatible with performBatchUpdates, making it easy to animate UITableView and UICollectionView updates safely, as demonstrated in the demo.
Optionally reduces delete/insert pairs into moves for cleaner change sets, improving animation clarity and reducing step counts.
Requires all models to implement DiffAware, adding boilerplate code and potentially forcing modifications to existing data structures.
Designed solely for flat arrays and similar collections; does not support diffing of hierarchical or graph-based data out of the box.
As a Swift library focused on UIKit and Texture, it is not suitable for cross-platform or server-side Swift projects without significant adaptation.