Jump to content

Lag every 5 seconds!


Recommended Posts

Hi all!

Regardless of the setting of the game , about every 5-7 seconds the lag ( Frieze ) by 0.5 seconds. This problem is called after the reset values and Allocated Unused Reserved.

How to deal with it?

Video: 

 

Link to comment
Share on other sites

On small thing, you have posted in the wrong section as you run mods. One thing that used to affect this was the garbage collection done by Unity, something which is made worse by running mods.

Do you still have this problem if you run the game without mods?

Link to comment
Share on other sites

Hi @ben2988

Sorry to tell you this but this is just something the Unity game engine does, there's no fix for it, try not to let it bother you too much.

What's happening is the garbage collector in Unity runs when the heap memory is low (every few seconds) to find and remove anything in memory that are no longer used, such as temporary integers, float an string variables created by C# methods, being a memory managed language C# uses a GC to automatically clean up behind itself.

These variables are generated with everything, moving objects, physics, collision checking, graphical user interface (GUI) updates, everything, and the more there are the longer it can take for the GC to check them, even if there's not much to actually free.

One of the biggest contributors to this in Unity4 is the GUI calls, but Unity5 uses a new much more efficient GUI method, a lot of the work for 1.1 has been to recreate the KSP GUI in Unity5.

Unity5 also includes many performance improvements across the board compared to Unity4, including a newer and fully multi-threaded physics engine.

So there's nothing you can do about it currently, but things should improve with KSP 1.1 on the Unity5 engine.

Which is coming soon, as you can see in the devnotes in the daily Kerbal section :)

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