Replies: 2 comments 1 reply
-
Your project sounds pretty interesting. Delivering mods over MQTT is cool.
There are two parts to this. There's the build of the host (native Moddable SDK) and the build of the mod. A debug host has the debugger support enabled and some additional bookkeeping for instrumentation. If the debugger is inactive, most of that is pretty light at runtime. When you build the mod (or any other JavaScript) with debugging enabled, XS includes opcodes to know the current source file and line number. That takes space and some time in execution. If you use a release build of the mod on a debug build, all that overhead goes away.
For RAM & ROM efficiency, the root VM and all workers are cloned from the same preloaded image use the same Moddable SDK / XS build. So, they are effectively the same. But, as noted above, you could build the JavaScript of the host and mod with difference debug / release settings.
Smaller firmware image (all debugging support is compiled out) and faster. Since your mod is coming from the network, you don't need the debugger bridge to install them (which is what mcrun uses). So, a release build should be enough and will be lighter in all respects. But, if you do not have significant performance or memory considerations in your project, a debug build probably won't get in your way. |
Beta Was this translation helpful? Give feedback.
-
So if I understand correct debug host with release mod works but release host with debug mod doesn't due to missing debugger support? Or will it run but just not provide debug info? Remind me: loading multiple mods is possible in principle but the tools don't support that? |
Beta Was this translation helpful? Give feedback.
-
I'm trying to get a base host app put together that can act as a supervisor for mods that are loaded over the network (primarily mqtt). I'm trying to figure out what permutations of host/mod and workers makes the most sense. This raises some questions:
Beta Was this translation helpful? Give feedback.
All reactions