Revert "Revert "Remove graphite optimizations.""

This reverts commit 011a302a24ac1effd31273a959bd880142d75596.