Jump to content

[1.4+ & 1.8+] Hyperspace - Load KSP faster on HDD (or not)


sarbian

Recommended Posts

This is a really small mod that may or may not help your KSP loading reach hyperspace for HDD users. It worked for a small sample of tester and the result are more likely tied with how fast your disk are and how much memory you have (if you have 16GB of ram this should not help the 2nd loading because the game will most likely be cached)

How to properly test if things are faster. Launch the game twice up the main menu without the mod installed (one to cache things a bit, then to measure). After the second launch open the KSP.log and search for the "Loading Systems: Elapsed time is 29.1946s" line.

Then install the mod, launch and look at the line again and tell me if it did anything for you. (if you have ModuleManager it will rebuild the cache on the first launch so you will have to launch twice...)

Download for KSP 1.4-.1.7

Download for KSP 1.8+

License MIT

 

Edited by sarbian
Link to comment
Share on other sites

I run a pretty slim install because modding means restarting KSP frequently.  But let's have a look here.

Before: Loading Systems: Elapsed time is 55.90594s
After:  Loading Systems: Elapsed time is 45.87465s

10 seconds is huge, so thank you, sir!!!

But...  it doesn't come with any hypercats.  Why are there no hypercats?

Link to comment
Share on other sites

46 minutes ago, nightingale said:

 

But...  it doesn't come with any hypercats.  Why are there no hypercats?

Because the hyperdogs chased them away? :P

 

Nice mod! now to see if my SSD is up to scratch!

Link to comment
Share on other sites

@sarbian

Thx, great mod. :)

I usually preload GameData and KSP_x64_Data into RAM-Cache with this tool and the batch file in the spoiler section.
Then run it 1 or 2 times, to have the modulemanager patches cached. (200 Mods)
When loading it then, KSP loads without noticable HDD activity ( so 99% from RAM-cache).

And even that good prepared startup Hyperspace can speed up:
[LOG 01:07:05.741] Loading Systems: Elapsed time is 279.3334s
[LOG 01:14:19.143] Loading Systems: Elapsed time is 200.1533s
(both times modulemanager loaded the cached version - no patches)

Nice! :)
BTW, wonder how that works?!

BR
JebsSY

Spoiler

cachefolder ./Gamedata
cachefolder ./KSP_x64_Data

 

Edited by Jebs_SY
Link to comment
Share on other sites

15 hours ago, Jebs_SY said:

@sarbian
How does that work from the coding side? Whats the principle behind it? Saw some assembler in the code.

The IL assembly is the black magic part. What the mod actually does is switching the constructor code of mono BinaryReader with my implementation that just add a BufferedStream before the reader.

Edit: I am sure it could be made even faster but it get complex fast :)

Edited by sarbian
Link to comment
Share on other sites

  • 3 weeks later...

Before: Loading Systems: Elapsed time is 1044.615s

After: Loading Systems: Elapsed time is 1017.488s

System: Windows 10 64bit, 32gb DDR3, 1TB SSD

Game Version: KSP 1.4.2, 164 mods

 

Just to make sure I did this right, the .dll file goes into the Gamedata folder, yes?

 

Edited by DracoSilverpath
Link to comment
Share on other sites

On 3/22/2018 at 5:17 PM, Jebs_SY said:

@sarbian

Thx, great mod. :)

I usually preload GameData and KSP_x64_Data into RAM-Cache with this tool and the batch file in the spoiler section.
Then run it 1 or 2 times, to have the modulemanager patches cached. (200 Mods)
When loading it then, KSP loads without noticable HDD activity ( so 99% from RAM-cache).

And even that good prepared startup Hyperspace can speed up:
[LOG 01:07:05.741] Loading Systems: Elapsed time is 279.3334s
[LOG 01:14:19.143] Loading Systems: Elapsed time is 200.1533s
(both times modulemanager loaded the cached version - no patches)

Nice! :)
BTW, wonder how that works?!

BR
JebsSY

  Hide contents

cachefolder ./Gamedata
cachefolder ./KSP_x64_Data

 

Interesting! I tried doing as you said there with the folder cache, but did not see any real improvement on my load time.

That said, i'm not 100% sure I did it correctly either. I installed it, right clicked and loaded the gamedata and 64_data folders into ram, then launched the game twice. The bit you mention about a batch file kinda lsot me :(

Link to comment
Share on other sites

15 hours ago, Kawoosh23 said:

Before :  Loading Systems: Elapsed time is 84.64879s

Now : Loading Systems: Elapsed time is 42.43088s

 

WOW  !!!

Are you sure there wasn't some file caching also going on there?  Most OSes cache files in RAM if you have enough spare, so loading KSP the 2nd time will always be faster if you haven't done much else in between.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...