Optimize some DOM interactions that happen on-scroll