XR optimization