Improve rendering perf. via less calls to ele.visible() & in z-index sorting #556