Thoughts on a synchronous rcl.init() function #757
wayneparrott
started this conversation in
General
Replies: 1 comment
-
I think using
My concern is that whether this kind of change will influence the user experience/real-time performance, e.g. When publishing a topic and the JS messages are not there, the time consumption of generating messages may be not acceptable during run time. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Presently
rcl.init()
(see index.js) is an asynchronous function due to it's file system access to detect format changes in generated message files. I would like to open a discussion around the idea of adding a synchronous version ofinit()
, e.g.,rcl.initSync()
,rcl.basicInit()
orrcl.fastInit()
, which either does not perform file system access or includes the ability to opt out of automatic message version check and regeneration.A use-case is the rate.js implementation that creates a private rcl environment using it's own context. Because the implementation has to call
rcl.init(privateContext)
theNode.createRate()
method is unnecessarily async. I say unnecessarily async because rate.js has no dependencies on generated msg files yet it inherits that overhead fromrcl.init()
.Thoughts?
One impl may look like this:
Beta Was this translation helpful? Give feedback.
All reactions