Revert g2: add optimization

This reverts commit 0f4ec9baedb576c980ae4804cb85dc4f5803234a