Closed meyerj closed 3 years ago
Because currently the node will create parameter services by default, it's small chance that no handle is added at the beginning. I'd like to put this issue to be low-priority. Meanwhile, #763 has been submitted to solve it. https://github.com/RobotWebTools/rclnodejs/blob/6f8a1a156780b131823e48650a35d9ff4760e462/lib/node_options.js#L22-L31
Cool, thanks!
From https://github.com/RobotWebTools/rclnodejs/pull/751:
Thanks for giving the feedback and submitting the PR. Indeed, if there are no subscriptions/clients created, the CPU load will be high (although we usually created a node with clients added).
Some thoughts: Waiting for a certain period, .e.g 1ms, could solve the high CPU load issue, but using a semaphore is a perfect way to do this because there will be no extra looping, and totally event-driven.
Originally posted by @minggangw in https://github.com/RobotWebTools/rclnodejs/issues/751#issuecomment-743775623