Skip to content

ROS2 Zenoh: Cache ROS2 JSON representation in message hash tree #253

@Carter12s

Description

@Carter12s

Minor performance optimization, but also hopefully makes the code more clean.

Currently when generation JSON representation of a message in order to calculate the ROS2 hash, we recursively generate the JSON for each referenced sub-message, and then discard these immedeatly.

This means the JSON representation for something like std_msgs/Header might be re-generated hundreds of times. Since codegen happens in macros this can cause IDE lag for users.

Instead we should store an Option on the Message type and store what is needed in there when it is calculated the first time. We shouldn't need to worry about "walking the graph" in a particular order.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions