I suppose this isn’t a new idea or suggestion, but I’ve often wished that Grasshopper (GH2 maybe?) could provide some sort of pre-emptive warning or opportunity to back away from a solution consisting of many many iterations,
Often this is the result of accidental datatree mismatching or forgetting to change from Item => List Access, but it can easily happen that eg. a param consisting of 2,000 data points gets somehow wrongly grafted
or wired to the wrong input. This multiplies the number of iterations 2000-fold and locks up the solver, leaving no choice but to force quit Rhino.
So what if, at the start of a component’s calculation, it detects that it’s being asked to run a huge number of iterations and throws up an internal flag to start a timer, for e.g. the first 10 steps, or counting the iterations completed in a second. Extrapolating from that would provide some estimate for the expected time needed for the entire calculation, and if it’s some absurdly long period the user could be shown a pop-up warning like:
The component XYZ is scheduled to run 4,000,000 times according to its number of inputs. This might take approximately 56 hours (2.3 days) to complete. Are you sure you want to continue?
Abort Continue (20s countdown timer) ☐ Do not show again
And then aborting would restore the previous solution state from the UndoRecord and possibly undo the most recent wire connection actions. Of course I’m assuming that the main thread somehow regains control between each iteration step to do data management, but this might not be the case or that there are other complications?