Jump to content

500000 lines of garbage in save file


Recommended Posts

Every time it autosaves, it stutters badly 2 or 3 times. I've seen this before with large save files... apparently KSP puts file saving directly in the simulation loop without caching - very bad.  It also reloads the whole file at every scene change... like KSC to VAB, VAB to launchpad... each change takes 20+ seconds. So slow. My save file is 38 MB partly due to 500,000 lines of this junk:

Spoiler

    }
    SCENARIO
    {
        name = ScenarioDestructibles
        scene = 5, 7, 6, 8
        SpaceCenter/Administration/Facility/mainBuilding
        {
            intact = True
        }
        SpaceCenter/AstronautComplex/Facility/building
        {
            intact = True
        }
        SpaceCenter/LaunchPad/Facility/LaunchPadMedium/ksp_pad_cylTank
        {
            intact = True
        }
        SpaceCenter/LaunchPad/Facility/LaunchPadMedium/ksp_pad_launchPad
        {
            intact = True
        }
        SpaceCenter/LaunchPad/Facility/LaunchPadMedium/ksp_pad_sphereTank
        {
            intact = True
        }
        SpaceCenter/LaunchPad/Facility/LaunchPadMedium/ksp_pad_waterTower
        {
            intact = True

>snip< 


        SpaceCenter/Runway/Facility/Section5
        {
            intact = True
        }
        d13b84b6-bdd7-449e-a38f-563133823aa0
        {
            intact = True
        }
        bb433d23-2651-46cb-8b0b-4a6baf84751f
        {
            intact = True
        }
        6dc08ddc-0405-4024-840a-17c8e1966c7c
        {
            intact = True
        }
        bee97fde-7cb3-49f7-9729-b2b4f9ebea4b
        {
            intact = True
        }
        8b8ecfd1-01f3-4c47-a43c-5fe239a05653
        {
            intact = True
        }
        fe4c0f24-ee50-4d24-abfc-f0d3ef3d98c5
        {
            intact = True
        }
        7bc5a7e1-a7e5-4feb-9c46-ad9d1b603cfc_0
        {
            intact = True
        }
        44330ddf-cfa8-4258-a90a-8dc16b198d05_0
        {
            intact = True
        }
        996f4d1a-d43f-413d-ae04-fb3cb7b00e02
        {
            intact = True
        }
        0cde76c9-14e8-4370-b8a2-34d043f92325
        {
            intact = True
        }
        55f2fb24-19f1-43d0-b1df-b8cd14b64b60
        {
            intact = True
        }
        6325b936-5815-4393-afe3-b0a5ee4937fb
        {
            intact = True
        }
        09beef08-43a1-495e-9aef-123c82f27750
        {
            intact = True
        }
        23f2e5ec-fe45-485b-a8bb-d18483384ab3
        {
            intact = True
        }
        e0868a4d-b88e-499b-b571-1e379e30779a
        {
            intact = True
        }
        284cbf89-46dc-47e1-9fd9-f4a66442ac9a
        {
            intact = True

I'm guessing it's Kerbal Constructs? I'm playing JNSQ and I've flown to every airport several times. It frequently does not remember when I open a resource at a KK facility. An early save only has maybe a hundred of these entries. 

Edited by Krazy1
typo
Link to comment
Share on other sites

On 11/12/2023 at 10:30 PM, Krazy1 said:

Every time it autosaves, it stutters badly 2 or 3 times. I've seen this before with large save files... apparently KSP puts file saving directly in the simulation loop without caching - very bad.  It also reloads the whole file at every scene change... like KSC to VAB, VAB to launchpad... each change takes 20+ seconds. So slow. My save file is 38 MB partly due to 500,000 lines of this junk:

  Reveal hidden contents

    }
    SCENARIO
    {
        name = ScenarioDestructibles
        scene = 5, 7, 6, 8
        SpaceCenter/Administration/Facility/mainBuilding
        {
            intact = True
        }
        SpaceCenter/AstronautComplex/Facility/building
        {
            intact = True
        }
        SpaceCenter/LaunchPad/Facility/LaunchPadMedium/ksp_pad_cylTank
        {
            intact = True
        }
        SpaceCenter/LaunchPad/Facility/LaunchPadMedium/ksp_pad_launchPad
        {
            intact = True
        }
        SpaceCenter/LaunchPad/Facility/LaunchPadMedium/ksp_pad_sphereTank
        {
            intact = True
        }
        SpaceCenter/LaunchPad/Facility/LaunchPadMedium/ksp_pad_waterTower
        {
            intact = True

>snip< 


        SpaceCenter/Runway/Facility/Section5
        {
            intact = True
        }
        d13b84b6-bdd7-449e-a38f-563133823aa0
        {
            intact = True
        }
        bb433d23-2651-46cb-8b0b-4a6baf84751f
        {
            intact = True
        }
        6dc08ddc-0405-4024-840a-17c8e1966c7c
        {
            intact = True
        }
        bee97fde-7cb3-49f7-9729-b2b4f9ebea4b
        {
            intact = True
        }
        8b8ecfd1-01f3-4c47-a43c-5fe239a05653
        {
            intact = True
        }
        fe4c0f24-ee50-4d24-abfc-f0d3ef3d98c5
        {
            intact = True
        }
        7bc5a7e1-a7e5-4feb-9c46-ad9d1b603cfc_0
        {
            intact = True
        }
        44330ddf-cfa8-4258-a90a-8dc16b198d05_0
        {
            intact = True
        }
        996f4d1a-d43f-413d-ae04-fb3cb7b00e02
        {
            intact = True
        }
        0cde76c9-14e8-4370-b8a2-34d043f92325
        {
            intact = True
        }
        55f2fb24-19f1-43d0-b1df-b8cd14b64b60
        {
            intact = True
        }
        6325b936-5815-4393-afe3-b0a5ee4937fb
        {
            intact = True
        }
        09beef08-43a1-495e-9aef-123c82f27750
        {
            intact = True
        }
        23f2e5ec-fe45-485b-a8bb-d18483384ab3
        {
            intact = True
        }
        e0868a4d-b88e-499b-b571-1e379e30779a
        {
            intact = True
        }
        284cbf89-46dc-47e1-9fd9-f4a66442ac9a
        {
            intact = True

I'm guessing it's Kerbal Constructs? I'm playing JNSQ and I've flown to every airport several times. It frequently does not remembering when I open a resource at a KK facility. An early save only has maybe a hundred of these entries. 

I'm not sure about that spam specifically, but KSP Community Fixes has several optimizations to the save file system, among others.

Link to comment
Share on other sites

11 hours ago, JonnyOThan said:

I'm not sure about that spam specifically, but KSP Community Fixes has several optimizations to the save file system, among others.

Thanks. I've been using that. It didn't seem to help much with the save-stuttering issue or scene change load time but I haven't done a real direct comparison. It did help with the KSP load times and terrain-morph stuttering, like when a mountain changes shape as you get closer.

Link to comment
Share on other sites

Kerbal Konstructs is likely to be at least partly to blame, it adds a lot of extra buildings and structures which will all be tracked in the save file. JNSQ’s built-in KK bases are large and well-stocked with stuff, but I don’t remember having any huge issues with save file bloat the last time I used it (admittedly it was a couple of years ago now).

Try removing Kerbal Konstructs, copy your persistent.sfs and then delete all those lines- except for those referring to the KSC itself- from that copy and see if that save loads faster.

Link to comment
Share on other sites

On 11/18/2023 at 3:11 PM, jimmymcgoochie said:

Try removing Kerbal Konstructs

Worth a shot although I'll miss having them. Removed KK, Omega's stockalike structures (also needed for the KK buildings in JNSQ), JNSQ-KSRGAP and Pilot Assistant.  Deleted all the hex-code objects for destructables. SFS is now 30 mb, was 38. "only" 900k lines now.
It does seem a little faster going to KSC, and it's smoother without drawing each object after it shows the scene. The in-flight save stutter is better, still stutters a couple times but not as long. 

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