Skip to content

Commit

Permalink
Fix typo (#1224)
Browse files Browse the repository at this point in the history
Summary:
Issue fixed: #

- [x] All tests pass. Demo project builds and runs.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Pull Request resolved: #1224

Differential Revision: D9003381

Pulled By: rnystrom

fbshipit-source-id: d0369d82b3f20bb15b94515d34d9667c34790fb2
  • Loading branch information
richardtop authored and facebook-github-bot committed Jul 25, 2018
1 parent 2eb6b4c commit f671430
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Guides/Best Practices and FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ See discussion at [#184](https://github.com/Instagram/IGListKit/issues/184).

#### I have a *huge* data set and [`-performUpdatesAnimated: completion:`](https://instagram.github.io/IGListKit/Classes/IGListAdapter.html#/c:objc(cs)IGListAdapter(im)performUpdatesAnimated:completion:) is *super* slow. What do I do?

If you have multiple thousands of items and you cannot batch them in, you'll see performance issues with `-performUpdatesAnimated: completion:`. The real bottle neck behind the scenes here is `UICollectionView` attempting to insert so many cells at once. Instead, call [`-reloadDataWithCompletion:`](https://instagram.github.io/IGListKit/Classes/IGListAdapter.html#/c:objc(cs)IGListAdapter(im)reloadDataWithCompletion:) when you first load data. Behind the scenes, this method *does not* do any diffing and simply calls `-reloadData` on `UICollectionView`. For subsequent updates, you can then use `-performUpdatesAnimated: completion:`.
If you have multiple thousands of items and you cannot batch them in, you'll see performance issues with `-performUpdatesAnimated: completion:`. The real bottleneck behind the scenes here is `UICollectionView` attempting to insert so many cells at once. Instead, call [`-reloadDataWithCompletion:`](https://instagram.github.io/IGListKit/Classes/IGListAdapter.html#/c:objc(cs)IGListAdapter(im)reloadDataWithCompletion:) when you first load data. Behind the scenes, this method *does not* do any diffing and simply calls `-reloadData` on `UICollectionView`. For subsequent updates, you can then use `-performUpdatesAnimated: completion:`.

#### How do I use IGListKit and estimated cell sizes with Auto Layout?

Expand Down

0 comments on commit f671430

Please sign in to comment.