Jump to content

KSP1 slow loading cause found: octagonal struts


eekee

Recommended Posts

This concerns loading time in KSP1, especially the time taken to launch from the VAB or SPH. For quite some time, I've been complaining that the more active vessels you have in a KSP1 save, the slower loading gets. This may be true in a small way, but not nearly to the extent I thought. Rather, a different issue is primarily to blame: single bugged vessels. Let me tell you what I've experienced.

I began playing KSP with a single sandbox save called Silica Cubicle. (Please excuse the pun.) I kept my early experiments if they had enough delta-V to go places. I started building refueling infrastructure with mining ships, tankers, and a couple of space stations. I launched relays and exploration vessels. I developed spaceplanes. By the time I had 30 vessels in flight, launching from the SPH got so slow as to hinder development. I started a new sandbox game, Test Bin, just for development.

Fast-forward a couple of years. I installed KSP on a different computer and copied my old save games. Eventually, I found launching in Test Bin to be very slow. This was strange because Test Bin only had 3 active flights. I deleted just 1 ship and found launching from the VAB to be as fast as a new game! Then I noticed launching from the VAB was fast in Silica Cubicle too, and remembered I'd deleted some early experimental probes.

The ship deleted from Test Bin was nothing special. It only had 36 parts. The other two vessels were larger; a big relay drone with 87 parts and a spaceplane with 53 parts. The probes deleted from Silica Cubicle had only 25 parts.

The problem vessels have something in common: octagonal struts (both kinds), connected node to node. The Test Bin ship had 2 runs of 6 octagonal struts. The 3 Silica Cubicle probes each had a run of 3 cubic octagonal struts with strut connectors bracing them. I hypothesize that if we avoid using either kind of octagonal strut in KSP1, our games will load much faster.

The uniqueness of octagonal struts
Octagonal struts (both kinds) are unique in being structural pieces with no autostrut option, indicating they behave unusually in the physics engine. (If there are other parts like this, I'd appreciate corrections.) I wonder if runs of them are treated as a single part. If so, loading them would requiring extra computation to determine if they're offset or rotated. Perhaps this code is slow. It's worth noting that octagonal struts are also problematic in KSP2 which aims for fast loading times. Optimizing code can introduce some very difficult bugs.

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