Jump to content

Alter file structure to improve loading time


Recommended Posts

The slowest part of launching the game is waiting for the hundreds of little model files to load. I'd like to suggest packing as many of the small, miscellaneous files as possible into a single file, which can then be read into memory as a single file, unpacked quickly in RAM, after which the packed version in memory can be disposed of. Just combining hundreds of small files into a single larger file should result in considerable time savings, especially for those using mechanical hard drives. If I had to take a shot in the dark, I'd guess loading time for those files could be cut by half to two-thirds.

Note that I'm not necessarily suggesting compressing these files, although compression might result in more time savings. A lot of these small model files compress down extremely well even with the fastest & least computationally intensive compression methods available. The extra computation associated with decompressing the package in memory will be offset by the fact that the disk read only takes 20% as long to perform (Testing suggests the model files could be 80% smaller on the disk.). Depending on the speed of the compression, it could result in longer or shorter load times, difficult to say at this point.

Link to comment
Share on other sites

This type of optimization will probably happen at the end of the beta cycle.

As he said... it will probably happen at the end of Beta and seeing as we are currently in Alpha for KSP then full optimisations are a long way off...

But I do think they will do a minor optimisation at the end of the Alpha

Link to comment
Share on other sites

The only thing that containerizing all of the files would do, is let the dumber disk defragmenters make the folder structure contiguous. The game still needs to load in each asset, and the load time may increase; due to needing to de-wrapper every file.

Having them as individual files just works. And with the larger hard drives now, you wouldn't lose much, even the few KB of wasted sector (smallest region that is addressable on-disk, i.e. 1KB file is saved to a 4KB sector "wasting" 3KB.) space.

Now, compressing all the textures into the standard directx or similar format for decompression on your videocard itself would go a LOOONG way towards performance. As it stands now, it uses raw images that it loads into RAM.

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...