Less calls to itemFromIndex
First do visibilty check to reduce branching
Memoize visibility filter
Various small performance improvements