Define calculateViewIndex method differently in grid mode and list mode, for efficiency reasons
Expose the divider indexes when running renderDividers
Implement binary search to find closest divider index before or on a specific index
Let getDividersBeforeIndex do an array slice instead of array filter, which is much faster