Optimization of raycasts in ModuleEngines.EngineExhaustDamage() and ModuleDeployableSolarPanel.CalculateTrackingLOS() :
Only synchronize transforms on the first raycast from any of those modules, mainly relevant when something else is moving transforms in between calls, which is often the case for active engines with gimbals, with a call time divided by 4-5 for ModuleEngines.FixedUpdate() when engines are actively gimballing (which is almost always the case as long as the SAS is activated)
Cached ScaledSpace raycast results for solar panels (alongside some other smaller optimizations) : ModuleDeployableSolarPanel.FixedUpdate() call time is divided by between 4 (when blocked by a scaled space object) and 2 (when not blocked)
On a side note, it seems there are some unrelated optimizations opportunities in ModuleDeployablePart.FixedUpdate() (which is the base class of solar panels, also shared by radiators and antennas), as when profiling (static) solar panels, the bulk of the call time was spent there doing more or less nothing. I suspect continuously (and uselessly) setting the drag cube weights is in large part responsible.
Optimization of raycasts in
ModuleEngines.EngineExhaustDamage()
andModuleDeployableSolarPanel.CalculateTrackingLOS()
:ModuleEngines.FixedUpdate()
when engines are actively gimballing (which is almost always the case as long as the SAS is activated)ModuleDeployableSolarPanel.FixedUpdate()
call time is divided by between 4 (when blocked by a scaled space object) and 2 (when not blocked)On a side note, it seems there are some unrelated optimizations opportunities in
ModuleDeployablePart.FixedUpdate()
(which is the base class of solar panels, also shared by radiators and antennas), as when profiling (static) solar panels, the bulk of the call time was spent there doing more or less nothing. I suspect continuously (and uselessly) setting the drag cube weights is in large part responsible.