Subject: the real cost of the Nasal Garbage Collector
Richard wrote:The results are interesting; as the only time we drop below 60fps is when Nasal is active, and the canvas displays are powered on and updating; in which case the frame rate drops to 51.3fps. If anything the maximum effect I'm seeing is a drop from 91fps to 75fps in comparable situation when Nasal is unloaded.
It would make sense for the Canvas subsystem to be fully optional (at startup via property switch) and removable (using the remove-subsystem fgcommand). The corresponding cppbind bindings should be added/removed dynamically via the bind/unbind methods to ensure that we don't clutter the namespace with stuff that is not even running.
This will greatly simplify any future troubleshooting/benchmarking efforts - and we could/should also add dedicated draw masks for Canvas placements (gui, cockpit, scenery) - and maybe even allow placements to be annotated with a drask-mask name, so that custom MFDs can be easily disabled using the same /sim/rendering/draw-mask method, probably with a canvas sub-branch in it.
It would be trivial for us to change the addPlacement() calls to .set("draw-mask-name", "captain-pfd") - at which point, the whole thing would register a osg::switch for the placement (camera)