optimize performance sample