Optimize attribute define.