Erik > > On Fri, 2011-06-17 at 10:55 +0300, thorsten.i.r...@jyu.fi wrote: > > At this point, it made a lot of sense to code in Nasal, if only for the > > simple reason that I couldn't know if it would ever included into the > base > > package or not. > > As an addition it also helped to develop good insight in efficient Nasal > programming which might prove to be very useful in the future. >
I'm not sure that 'efficient Nasal' isn't an oxymoron :-) I would never claim to have written efficient, or even good or clever Nasal, but here are some simple heuristics: Avoid for and while loops - if you must have them, keep the number of iterations low, otherwise you will kill the frame rate. It is better to do a little work every frame rather than a lot of work in intermittent frames, otherwise you will introduce jitter. Avoid writing too many lines, otherwise the evil god Garbage Collector will bite you. Avoid writing Nasal. Now we are compiling snapshots of the source code nightly, where code is generally applicable it should, if at all possible, be written in c++. Here is the long version: http://wiki.flightgear.org/index.php/Nasal_scripting_language Perhaps Melchior will provide better advice. Vivian ------------------------------------------------------------------------------ EditLive Enterprise is the world's most technically advanced content authoring tool. Experience the power of Track Changes, Inline Image Editing and ensure content is compliant with Accessibility Checking. http://p.sf.net/sfu/ephox-dev2dev _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel