Skip to content

Remove array traversal on each cellItem lookup #3

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 16, 2018

Conversation

disabled
Copy link
Member

@disabled disabled commented Nov 1, 2018

Provides a huge performance boost on collections with lots of elements.

return nil
}

guard sectionItem.cellItems.count > indexPath.row else {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to combine all guards in one

Copy link
Contributor

@Antowkos Antowkos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to move every condition to a new line, but isn't necessary though

@Antowkos Antowkos merged commit b57c0d9 into master Nov 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants