You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The KSP loader has a long standing issue where a lot of small atomic operations are done in frame-yielding coroutines.
Extensive texting show that the overhead of having to render a frame in-between each atomic operation is quite tiny, less than 1%.
However, this start to matter a lot more if framerate is capped. KSP ensure that no limit is active on its side, but it can't do anything about GPU driver enforced limits (VSync, adaptive sync, whatever...), which is a relatively common scenario nowadays. With a 60 FPS limit in place, loading can easily take 3 times longer than in an unlimited framerate scenario.
Aside from that, asset loading can be made significantly faster by pulling the data from disk to memory in a separate thread and queuing the in-memory data for being processed continuously in the main thread.
The FastLoader KSPCF patch is a complete reimplementation of the core KSP loader :
Removal of framerate dependency in asset loading and part compilation stages.
Parallel async loading of audio assets
A worker thread is used to pull texture and model asset from disk to memory, putting them in a buffer to be consumed by the main thread. Also implement a byte array pool to reduce GC allocations.
Various small optimizations to the individual main thread asset loaders, mainly in the PNG loader (faster parsing, faster swizzle algorithm for normal maps)
Caching of PNG textures as raw DXT5 compressed data (reimplementation of the TextureLoaderOptimization patch)
Overall, this gives a 20 to 50% bump in asset loading speed depending on hardware specs, which depending on installed mods gives a 15-30% total loading time improvement.
The text was updated successfully, but these errors were encountered:
The KSP loader has a long standing issue where a lot of small atomic operations are done in frame-yielding coroutines.
Extensive texting show that the overhead of having to render a frame in-between each atomic operation is quite tiny, less than 1%.
However, this start to matter a lot more if framerate is capped. KSP ensure that no limit is active on its side, but it can't do anything about GPU driver enforced limits (VSync, adaptive sync, whatever...), which is a relatively common scenario nowadays. With a 60 FPS limit in place, loading can easily take 3 times longer than in an unlimited framerate scenario.
Aside from that, asset loading can be made significantly faster by pulling the data from disk to memory in a separate thread and queuing the in-memory data for being processed continuously in the main thread.
The FastLoader KSPCF patch is a complete reimplementation of the core KSP loader :
Overall, this gives a 20 to 50% bump in asset loading speed depending on hardware specs, which depending on installed mods gives a 15-30% total loading time improvement.
The text was updated successfully, but these errors were encountered: