Performance optimization by not showing filtered elements needlesly