Skip to content

Commit bca9343

Browse files
committed
Updates README.md with rationale.
1 parent 896bced commit bca9343

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ Observable.just([SectionModel(model: "title", items: [1, 2, 3])])
5656
```
5757
![RxDataSources example app](https://raw.githubusercontent.com/kzaher/rxswiftcontent/rxdatasources/RxDataSources.gif)
5858

59+
## Why was custom diff algorithm used?
60+
61+
- All dynamic programming diff solutions (longest common subsequence problem) have worst quardratic time complexity O(n^2). If you are interested in exploring those solutions, we recommend [Diff](https://github.com/wokalski/Diff.swift#diffswift).
62+
- It's even more problematic to reconcile tree edit distance algorithms with `UI{Table,Collection}View` animated section updates.
63+
- In all practial cases each section item is uniquely identified and that can be used to optimize the algorithm.
64+
5965
## How
6066
Given the following custom data structure:
6167
```swift

0 commit comments

Comments
 (0)