Skip to content

Remove array traversal on each cellItem lookup - #3

Merged
Antowkos merged 2 commits into
masterfrom
optimizations/cell-item-lookup
Nov 16, 2018
Merged

Remove array traversal on each cellItem lookup#3
Antowkos merged 2 commits into
masterfrom
optimizations/cell-item-lookup

Conversation

@disabled

@disabled disabled commented Nov 1, 2018

Copy link
Copy Markdown
Member

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

Comment thread Sources/CollectionViewManager.swift Outdated
return nil
}

guard sectionItem.cellItems.count > indexPath.row else {

Copy link
Copy Markdown
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

@Antowkos Antowkos left a comment

Copy link
Copy Markdown
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 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