Optimized the updates to only update when in the viewing window