Optimize and profile edit