Minimize getAttributes() calls