not sure, you know the performance of this better than me, but is it worth it to get those 3 variables outside oft he scroll handler in order to avoid computing them each time?