Leveraging the data_to_string() method to convert DDS samples into XML

3 posts / 0 new
Last post
Offline
Last seen: 2 months 2 days ago
Joined: 02/17/2025
Posts: 3
Leveraging the data_to_string() method to convert DDS samples into XML

Hi all,

I'm using RTI Connext DDS in a production system and leveraging the data_to_string() method to convert DDS samples into XML. This XML is then parsed using XPath queries to extract specific fields dynamically.

However, I’m encountering a significant performance issue — the data_to_string() call is taking up to 6 seconds for the first time, which is not acceptable for our use case.

System Context:
Language binding:C++
Use case: XML is parsed using XPath to extract dynamic fields
Questions:
Is data_to_string() optimized for this kind of usage, or is it intended only for debugging?
Is the method thread-safe? Can it be used concurrently across threads?
Are there known performance optimizations or alternatives for converting DDS data to XML (or another XPath-compatible format)?
Would using DynamicData introspection or a custom serializer be more efficient for XPath-style querying?
Any guidance, best practices, or alternative approaches would be greatly appreciated!

Thanks in advance

Organization:
Offline
Last seen: 2 months 2 days ago
Joined: 02/17/2025
Posts: 3

can some reply here please

 

Howard's picture
Offline
Last seen: 16 hours 46 min ago
Joined: 11/29/2012
Posts: 661

Hi Vinrod,

Sorry the Forum isn't a formal source of support for RTI products.  It's provided as a way for RTI community members (users) to help each other.

Given that you work for an RTI customer that has a formal support contract, I suggest that you post your inquires through the support channel via your RTI customer portal login or an email to support@rti.com (please provide your customer ID or the name of the project that you are working on).