SSTU - Shadow Space Technologies Unlimited

SSTU - Shadow Space Technologies Unlimited

98.5k Downloads

Pre-Release TODO: General Enhancement - Optimization Pass - Editor Updates

shadowmage45 opened this issue ยท 1 comments

commented

Currently using OnEditorShipModified for callbacks for GUI events and other things. This often results in fairings being recreated, models re-sized, drag cubes re-rendered, when nothing has actually changed on the ship. This can cause in-editor lag, especially during vessel load/save, or even when parts are just moved.

Need to find a good method of delaying these updates and doing them at most on a once-per frame basis; some would even be appropriate to delay for longer periods (in-editor drag-cube updates and shielding updates).

Need to find a more efficient method of determining when an attach node has changed/etc, as the current fairing parts get deleted/recreated often when nothing has changed.

Should implement an external addon that manages doing a single per-tick update for a parts drag cube and shielding updates regardless of how many modules request updates, or how many times they are requested.

Most of this implementation will come during the 1.1 update, as I will finally be able to add my own GUI widgets with proper callback-on-value changed methods, and remove 95% of the on-editor-update code.

Problems to solve:

  • Drag Cube Updating / Part-Geometry Updating (modular/procedural)
  • Airstream Shield Updating (fairing module, airstream shield module... others?)
  • Attach-Node checking (fairing module)
  • GUI-slider-value changed callback / delegate / whatever
  • Recursive / redundant calls

Particularly bad parts to investigate, in order of lagginess:

1.) MUS tanks
2.) MFT tanks
3.) engine clusters
4.) MSRB parts
5.) MHS

commented

Yay, most of these have been accomplished in the 1.1 update. Closing ticket; will open a new ticket for specific areas that need optimization as I come across them.

In general the in-editor updates have been cut to 1/10 of what they were; drag cube and shielding updates only happen at most once per tick, and GUI sliders/etc no longer force an editor update event.

So much smoother :)