On Wed, Jun 23, 2010 at 07:06, Christopher Sean Morrison <[email protected]> wrote:
> On Jun 23, 2010, at 6:58 AM, Tom Browder wrote:
...
>> How much efficiency is gained (or lost) by writing the complete series
>> of commands to a script first, and then feeding it to mged in one
>> chunk?
...
> Batching the segments together in sets of 200 (i.e., 1800 commands at
> a time) takes LESS overall runtime than invoking MGED one segment at
> a time for just 10 segments (i.e., 9 commands at a time, 90 total
> commands).

Then wouldn't it be better still to do it in one script fed to mged?

I made a new script, spiral2.pl, that put all commands to stdout which
I then redirected to a file 't'.

Time to run:  0m 0.042s

Then I executed:

  mged -c t.g < t

Time to run: 0m 4.297s

Time to run spiral.pl with all output to stdout, stderr, and spiral,g: 1m 12s

Time to run spiral.pl with all stdout and stderr to a file, and spiral,g: 1m 11s

So, I think my method, tested for years, is generally faster.

BTW, both scripts are using default units.

-Tom

------------------------------------------------------------------------------
ThinkGeek and WIRED's GeekDad team up for the Ultimate 
GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the 
lucky parental unit.  See the prize list and enter to win: 
http://p.sf.net/sfu/thinkgeek-promo
_______________________________________________
BRL-CAD Users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-users

Reply via email to