Hilbert Curve, Koch Snowflake

 From:  bemfarmer
6441.9 
I did some practicing in writing faster scripts, with mixed results.

Hi Michael,
These are perhaps not very important questions, but for whatever value they may have, I'll ask them. :-)

I'm having a problem, or problems, with a new Hilbert Curve script which uses some script in htm file to speed up performance.
I understand that "heavy" script in the htm file "hangs up" MoI, until it completes.

The script works very fast the first time.
The script uses recursion.
Level 8 takes over 3 minutes to work, and Done cleanup takes over 3 minutes to complete, so the level is limited to 7 which takes 3 seconds initially.
A small question is: Why does level 8 work so slow? Limits on: Javascript stack?, memory leak?, history?

The script also (needed?) to use ObjectList, var objList, as a global variable, due to the recursion.

The main question is: Why does the performance of the script deteriorate, especially at level 7, when the still open script has selection changed back and
forth, for example, between polylines and curves?
For Example:
Activate the script. Level 4 shows up instantly, as a polyline. Select level 7, which takes 3 seconds to show up.
Select curve. The curve takes about 15 seconds to show up.
Select polyline. The polyline takes about 60 seconds to show up.

Another question is how to "erase" or "zero out" global objList? Or maybe that is not the problem.

Thank you,

- Brian

Ps: Another way to show points is to separate polyline and run MarkCurveStart.

Edit, deleted faulty script. Will re-do later. :-)

EDITED: 28 Jan 2014 by BEMFARMER