Regarding the performance on slow machines. I don't think it is necessary to add this 100ms delay. Did you see any significant change in CPU utilization?
As far as I understand the code, it is not the second time a program gets skipped, that it has to wait for 10s. Every time a program gets skipped it is moved to the skipped stack. And if one tool gets produced it immediately gets removed from the skipped stack.
Also, it is the main work program that gets skipped and not the subprogram.
Here is my understanding of the code. if a program returns a skipped state, it will be added to the table of skipped programs (sorted by its program name, toghether with the time of skipping it). If it later returns a completed state it gets erased from this table. this can be only subprograms as the main program does not report skipped as due to your very appreciated work it reports no stats.
At every program start the code iterates over the skipped programs assigns an earliest start time (reported skip time +10 seconds) and checks whether this is already passed. If yes the program gets started if not then not.
So basically neither of us was right in my view. but the effect of the 10 seconds could only occur in the atlantean or Frisian tool production. cause her the fail is as fast as skipping so if undersupplied and one programm skipped we will very quickly fail all programs skip the one program faill very quickly again and wait 10 seconds minus the small think times (at least 10 ms each as this is the normal waiting time if not skipped) for the failing programs. and then the whole thing gets repeated. in the empire and barbarian smithies a fail lasts about 20 seconds or so and therefore the mechanism will not be triggered. Its just to prevent productionsites with only one work program from skipping endlessly.