diff & patch for UITableView with large number of rows (changes between 0~5000)
Switch branches/tags
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
BigDiffer
Example
fastlane
.gitignore
.travis.yml
BigDiffer.podspec
Gemfile
Gemfile.lock
LICENSE
README.md
_Pods.xcodeproj

README.md

BigDiffer

Build Status Version License Platform

Usage

tableView.reloadUsingBigDiff(old: old, new: new)

where old & new are [T] where T: BigDiffableSection (c.f. ListDiff.Diffable). See in detail at example view controller code. Example project has some workarounds for other diff libraries in terms of applying large number of diffs.

Features

  • Multi section diff & patch for UITableView
  • Fast linear complexity diff algorithm a.k.a. Heckel, by making use of ListDiff
  • Optimize diff with some heuristics for large number of rows
    • Skip diffing for currently invisible sections (use reload)
    • Section-wise diff for currently (partially or completely) visible sections
    • Skip applying diff when many deletions detected (> 300), for each section

Installation

BigDiffer is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'BigDiffer'

Alternatively, use subspecs to use other diff & patch libraries with optimized fallbacks that reloadData for a large number of diffs (row deletions).

pod 'BigDiffer/Differ'

Author

@banjun

License

BigDiffer is available under the MIT license. See the LICENSE file for more info.