Revert "Merge pull request #2563 from ef4/render-optimization"

This reverts commit 082a9870b176113eada12ba71ed83dd9de2ed702, reversing
changes made to 68fc7fc08ef6d553b8e01c6972040be6e0655cd4.