Some optimization on mesh drawing