Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Module Engines Solver Optimizations #45

Merged
merged 3 commits into from
Feb 14, 2022
Merged

Conversation

DRVeyl
Copy link
Contributor

@DRVeyl DRVeyl commented Feb 5, 2022

Implemented deferred exhaust damage calculator for one batched raycast, instead of many single casts.
Cleaned up memory allocations and unneeded string settings.
Left some Profiler calls to highlight other areas that may need improvement.

Set engine temp string via guiUnits in Start instead of building every FixedUpdate (Unnecessary GC pressure)
Add profiling calls
Use nameof instead of hard-coded strings
Remove redundant KSPField (default) declarations
Tweak NK's caching of the unit strings!
Don't test exhaust damage for each engine & transform when operating.  Instead, queue the engine to a deferred calculator that runs after all PartModules and does a single batched raycast.
Breaking change necessitates new version: removal and addition of KSPFields
@NathanKell NathanKell merged commit 2662bdb into master Feb 14, 2022
@NathanKell NathanKell deleted the ModuleEnginesSolverProfiling branch February 14, 2022 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants