-
Notifications
You must be signed in to change notification settings - Fork 21
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
KSP loader performance optimization #109
Closed
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…omConfig or CreateConfigFromObject (#86)
* Rewrite PreFormatConfig to iterate through strings as little as possible. * Improve logging, add @siimav's parallel processing bit (seems to be strictly slower even for 1m+ rows, tho) * Patch writing, too, for a slight improvement in perf * Fix a lingering issue with trailing braces * Patch on startup, not after MM. Skipping keys will only happen after MM, but they're really just there for sfs loading, can't trust what's in gamedatabase enough to skip parsing there. * Update readme and Settings * Big improvements to save perf by not writing lines / flushing / using a puny buffer. * missed a newline
* Create ModUpgradePipeline modding patch. This patch will store and use mods' versions when running SaveUpgradePipeline scripts. * Go back to storing versions for all assemblies. Bump KSPCF version to minor, not revision. * Fix readme to link PR
* Rewrite more of ConfigNode. Avoid all recursion when reading from disk. Add further optimization around specific use cases (craft, sfs, cache loading). Add blacklist support (assumes all values are sane unless otherwise informed). * Try with MemoryMappedFile * Read to a char array, more inlining and optimizing This is better than it was, but in some cases the old version outperforms it. Fix some further parser issues, switch to new method of reading files Remove unused code from parser * Remove confignodeperf settings blocks, upodate readme * ConfigNodePerf: Patch copy, tostring, and parse as well. Refactor parse method so it can be used for either file or string case. * Allow not writing indents when saving nodes. * Found another copypasta issue with Santiize... * Rewrite ReadObject/WriteObject and associated code. Works fine in test but crashes my live game... * Add KSPAssembly attribute * Fixed exception when single field is specified more than once due to cfg error * Fix not saving nodes for objects/components when writing, cache fieldless objects to prevent recreating them when Persistent is applied wrongly * Fix fallback decoding for ReadFile * Don't double translate on load fail. Use a static stringbuilder, and reflect to clear previous chunks. * Further expand on notes in readme, clean up last bits prior to merge. Force sanitize off in the UpgradePipeline patch.
…for better support for other mods, update release script to behave correctly with new versioning bump version (only fileversion and KSPAssembly).
…'t support both sfs and craft contexts. Bump version.
When using physics warp, Unity will set the max physics dt to be at least as high as the scaled physics dt. But KSP will never restore it back to the normal value from the settings. This can degrade performance as it allows more FixedUpdates to run per frame. reported by Wilds on the forum: https://forum.kerbalspaceprogram.com/index.php?/topic/184740-solved-losing-300-performance-after-time-warping/
…patch doesn't apply to this version anymore
- Backport of the texture cache (TextureLoaderOptimizations) - Unpatching after loading to prevent breaking stock/MM database reload feature, as well as runtime drag cube generation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix issue #108
Fix issue #69
Reimplementation of the KSP loader :
Due to this relying on a lot of KSP implementation details, as well as some features only available in Unity 2019.4, this patch is limited to KSP 1.12+. The patch doesn't have any configuration mechanism, it is always active. The texture cache feature is still opt-in and can be disabled in the in-game settings.