Implemented a simple rendering optimization