QCBorValue::toJsonValue checks whether the CBOR data is in the JSON subset, which results in one allocation per value. As this is our own serialized data here, we don't need that check and can use the CBOR data directly.
The API for that fast path is unfortunately not public, but it's inline code, so it doesn't bind us to Qt's unstable internal ABI either.
This saves about 12M allocations during the startup of Itinerary here.
QCBorValue::toJsonValue checks whether the CBOR data is in the JSON subset, which results in one allocation per value. As this is our own serialized data here, we don't need that check and can use the CBOR data directly.
The API for that fast path is unfortunately not public, but it's inline code, so it doesn't bind us to Qt's unstable internal ABI either.
This saves about 12M allocations during the startup of Itinerary here.