···519519 struct xrt_relation_chain xrc = {0};
520520521521 m_relation_chain_push_pose_if_not_identity(&xrc, offset);
522522- build_relation_chain(uso, &xrc, ubase_space, uspace, at_timestamp_ns);
522522+523523+ // crude optimization: If locating a space in itself, we don't actually need to locate the space itself.
524524+ // only the offsets need to be applied.
525525+ if (uspace != ubase_space) {
526526+ build_relation_chain(uso, &xrc, ubase_space, uspace, at_timestamp_ns);
527527+ }
528528+523529 m_relation_chain_push_inverted_pose_if_not_identity(&xrc, base_offset);
524530525531 // For base_space =~= space (approx equals).