sarbian

[1.4-1.6] Hyperspace - Load KSP faster on HDD (or not)

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

License MIT

 

Edited by sarbian

Share this post


Link to post
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?

Share this post


Link to post
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!

Share this post


Link to post
Share on other sites

32GB of RAM and my GameData folder is on an SSD with the rest on a regular drive:

Before: 27.25993s and After: 27.48858s, so no noticeable improvement.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

8GB RAM, 1TB 7200rpm HDD, 2 GB nvidia 750, ~90 mods,  -force-d3d11, ksp 1.4.1

Loading Systems: Elapsed time is 150.6289s without
Loading Systems: Elapsed time is 137.8448s with

 

Edited by Acvila

Share this post


Link to post
Share on other sites

Before: Loading Systems: Elapsed time is 627.9476s

After: Loading Systems: Elapsed time is 386.0955s

Impressive.

Share this post


Link to post
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

Share this post


Link to post
Share on other sites

Before : 61 Secs
After : 43 Secs
I'm running KSP on a games dedicated 2To SSHD
(16Go RAM, i5-7600k @ 4Ghz and a 1070 8Go VRAM)

It's a nice improvement to me ! ^^

Share this post


Link to post
Share on other sites
1 hour ago, smotheredrun said:

@sarbian, would like to try this out, but wondering if this plugin/mod is backwards compatible to 1.3.1?

it should work fine in 1.3.x and 1.2.x

Share this post


Link to post
Share on other sites

Before install: 884.7262s

After install: 856.9284s

I'll take what I can get!!

:)

 

 

Edited by smotheredrun

Share this post


Link to post
Share on other sites

before : [LOG 15:34:50.465] Loading Systems: Elapsed time is 481.2033s

after :  [LOG 15:45:39.263] Loading Systems: Elapsed time is 477.5082s

4 seconds, ill take it LOL

Share this post


Link to post
Share on other sites

1.2.2, 16gb RAM, SSD...

213 seconds without, 232 with. :P Didn't work for me, I'm afraid.

On 4/12/2018 at 9:00 PM, smotheredrun said:

Before install: 884.7262s...

884.7262s...

884.7262s!

 

Holey crap, dude. :0.0:

Share this post


Link to post
Share on other sites
3 minutes ago, CatastrophicFailure said:

1.2.2, 16gb RAM, SSD...

213 seconds without, 232 with. :P Didn't work for me, I'm afraid.

Holey crap, dude. :0.0:

Good things come to those whom wait....

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
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 :(

Share this post


Link to post
Share on other sites

Before :  Loading Systems: Elapsed time is 84.64879s

Now : Loading Systems: Elapsed time is 42.43088s

 

WOW  !!!

Share this post


Link to post
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  !!!

Wow indeed!

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

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.