Script for Epitrochoid, Slider flicker

 From:  Michael Gibson
6158.5 In reply to 6158.4 
Hi Brian,

> Having the code in the .htm sure is a lot faster.

Yeah the script code in the .htm file is running inside of the moi.exe process (which is basically the main process that also handles displaying the UI and stuff like that), not inside of moi_commandprocessor.exe , so every time it makes a call into a MoI object it ends up calling it directly instead of doing an inter-process marshaled call. That's where the increased speed comes from.

So if it's faster you may wonder why doesn't everything do it that way? The downside is that a script that is running directly inside of MoI.exe can easily do things like freeze the main program UI if it goes into an extended amount of processing, and it can't easily be canceled while in the middle of doing processing.

The regular way that scripts work is to run in that separate moi_commandprocessor.exe process so that they can easily be canceled (by terminating moi_commandprocessor.exe) at any time without any particular cooperation from the script.

Regular MoI commands only use the script for doing sort of high level control flow like hiding/showing UI and moving between different stages of a command, not anything like loops with several hundred iterations so the inter-process overhead doesn't really make much difference for that kind of script use.

- Michael