Optimisation on scroll event.