Optimizing screen calculations