optimize screen clearing