Most of this is in the stock implementations, so anything that we improve here should probably also be lifted into KSPCF patches.
Notable problems:
PrepareRecipe gets called twice per FixedUpdate and makes a raycast each time.
GetAbundance is the same for every single drill on the same vessel and should be cached.
systemEfficiency doesn't actually do anything, because its changes to inputList and outputList get overridden by PrepareRecipe
- Inactive module instances still get
FixedUpdate called every frame even when they aren't actually doing any work.
Most of this is in the stock implementations, so anything that we improve here should probably also be lifted into KSPCF patches.
Notable problems:
PrepareRecipegets called twice perFixedUpdateand makes a raycast each time.GetAbundanceis the same for every single drill on the same vessel and should be cached.systemEfficiencydoesn't actually do anything, because its changes toinputListandoutputListget overridden byPrepareRecipeFixedUpdatecalled every frame even when they aren't actually doing any work.