Jump to content

KSP 1.4.1 Performance


Warezcrawler

Recommended Posts

I have throughout KSP history ever since 1.0 had a performance issue in KSP. While performance on 1.4.1 is much better than it has been I still experience one specific thing which I think is related to a mod, but I have been unable to isolate the mod.

Every few seconds it's like the game freezes for just an instant and then continuing - making the experience just a little less smooth than I could wish for. As stated I think it's one of my mods, since I have not recreated it in KSP unmodded.

So my quetion to you (the community) is, does anyone else experience this, and have anybody been successful in isolating the mod causing it?

I remember having this issue at least since 1.1, and I do think it is because I keep installing many of the same mods.

My mod/dll list from my KSP log. I have highlighted some of the .dll's which I seem to recall having back in the day as well, however it is a little foggy.

Spoiler

Environment Info
Win32NT 7FFFFFFFFFFFFFFF  Args: KSP_x64.exe 

Mod DLLs found:
Stock assembly: Assembly-CSharp v0.0.0.0
ModuleManager v3.0.6.0
MiniAVC v1.0.3.2
aaa_Toolbar v1.7.17.4
MiniAVC v1.0.3.2
USITools v1.0.0.0
MiniAVC v1.0.3.2
ToolbarControl v0.1.5.6 / v1.0.0.0
B9_Aerospace_WingStuff v1.0.0.0
MiniAVC v1.0.3.2
BetterTimeWarp v2.3.10.0
BonVoyage v0.13.2.1
Chatterer v0.9.94.2077
MiniAVC v1.0.3.2
MiniAVC v1.0.3.2
ClickThroughBlocker v0.1.6.0 / v1.0.0.0
CommNetVisualisation v1.0.0.0 / v1.0.2
CCK v2.0.2.0 / v2.0.2.0 for KSP 1.3
ContractConfigurator v1.0.0.0 / v1.24.0
MiniAVC v1.0.3.2
AGExt v2.3.3.0 / v1.0.0.0
TWR1 v1.0.0.0
DMagic v1.3.0.12 / vv1.3.12
ProgressParser v1.0.9.0 / vv9.0
ContractParser v1.0.8.0 / vv8.0
CapCom v1.0.2.8 / vv2.8
ContractsWindow v1.0.8.2 / vv8.2
ContractsWindow.Unity v1.0.8.2
MiniAVC v1.0.3.2
EditorExtensionsRedux v3.3.19.2
Atmosphere v1.4.0.1
CelestialShadows v1.4.0.1
CityLights v1.4.0.1
EVEManager v1.4.0.1
PartFX v1.4.0.1
PQSManager v1.4.0.1
ShaderLoader v1.4.0.1
Terrain v1.4.0.1
TextureConfig v1.4.0.1
Utils v1.4.0.1
_BuildManager v1.4.0.1
Firespitter v7.3.6652.37613
FlexoTubes v1.0.6.0 / v6.0
GTI_MultiModeConverter v2.6.0.0
GTI_MultiModeEngine v2.6.0.0
GTI_MultiModeHarvester v2.6.0.0
GTI_MultiModeIntake v2.6.0.0
GTI_Utilities v2.6.0.0
InterstellarFuelSwitch v2.11.1.0 / v2.11.1
MiniAVC v1.0.3.2
Scale_Redist v1.0.0.0
KAS v0.6.4.0 / v0.6.4 for KSP 1.4+
MiniAVC v1.0.3.1
KerbalEngineer v1.1.4.3
KerbalEngineer.Unity v1.0.0.0
KIS v1.10.6640.40620 / v1.10 for KSP 1.4
KSPDev_Utils.0.31 v0.31.6640.37756 / v0.31 for KSP v1.4
MiniAVC v1.0.3.0
MechJeb2 v2.5.1.0 / v / v2.7.1.0
MiniAVC v1.0.3.2
NavHud v1.3.5.0
MiniAVC v1.0.3.2
PreciseNode v1.2.9.0 / v1.2.4.0
ProjectManager v1.0.0.0
ProgressiveCBMaps v0.1.25.0
ResearchBodies v1.9.7.0
SCANsat v1.8.5.0 / vv18.5
SCANmechjeb v1.8.5.0 / vv18.5
SCANsat.Unity v1.8.5.0
CLSInterfaces v1.2.0.0
ShipManifest v5.2.1.0
SmokeScreen v2.8.0.0
Stock assembly: KSPSteamCtrlr v0.0.1.35
Stock assembly: Steamworks.NET v9.0.0.0 / v9.0.0
MiniAVC v1.0.3.2
TarsierSpaceTech v7.3.0.0
BetterTracking v1.0.2.0 / v2.0
BetterTracking.Unity v1.0.2.0
KerbalAlarmClock v3.9.0.0
TransferWindowPlanner v1.6.3.0
DynamicTanks v1.0.0.0
Konstruction v0.0.0.0
MiniAVC v1.0.3.2
MiniAVC v1.0.3.0
[x] Science! v5.13.6649.40338

Folders and files in GameData:
000_Toolbar
000_USITools
001_ToolbarControl
B9_Aerospace_ProceduralWings
BetterTimeWarp
BonVoyage
Chatterer
ClickThroughBlocker
CommNetVisualisation
CommunityCategoryKit
CommunityResourcePack
ContractConfigurator
ContractPacks
CrowdSourcedScience
Diazo
DMagicOrbitalScience
DMagicUtilities
EditorExtensionsRedux
EnvironmentalVisualEnhancements
Firespitter
FlexoDocking
GTIndustries
GTI_SimpleEPL
GTI_SimpleKarbonite
GTI_Utilities
InterstellarFuelSwitch
JoolBiomes
KAS
KerbalEngineer
Kerbalow
KIS
LETech
MechJeb2
Mk2Expansion
Mk3Expansion
ModRocketSys
NavHud
NearFutureProps
PreciseNode
ProjectManager
REPOSoftTech
SCANsat
ShipManifest
SmokeScreen
Solaris Hypernautics
SpaceY-Lifters
Stock folder: Squad

Stock folder: SquadExpansion

StationPartsExpansion
StockVisualEnhancements
TarsierSpaceTech
TrackingStationEvolved
TriggerTech
UmbraSpaceIndustries
UniversalStorage
[x] Science!
ModuleManager.3.0.6.dll
ModuleManager.ConfigCache
ModuleManager.ConfigSHA
ModuleManager.Physics
ModuleManager.TechTree
toolbar-settings.dat

Does anyone have a clue.

PS: I have tried installing them one by one, and somehow I missed when the problem started... Might be it is a combination thing.

Link to comment
Share on other sites

6 minutes ago, Tex_NL said:

You might want to check out this thread. As far as I know it's a very common problem.

 

Thanks. I will try it out. And even though it not updated yet, i read it still works... Nice.

 

More information is still welcome if anyone else have relevant input :o)

Link to comment
Share on other sites

56 minutes ago, Warezcrawler said:

I have throughout KSP history ever since 1.0 had a performance issue in KSP. While performance on 1.4.1 is much better than it has been I still experience one specific thing which I think is related to a mod, but I have been unable to isolate the mod.

Every few seconds it's like the game freezes for just an instant and then continuing - making the experience just a little less smooth than I could wish for. As stated I think it's one of my mods, since I have not recreated it in KSP unmodded.

So my quetion to you (the community) is, does anyone else experience this, and have anybody been successful in isolating the mod causing it?

I remember having this issue at least since 1.1, and I do think it is because I keep installing many of the same mods.

My mod/dll list from my KSP log. I have highlighted some of the .dll's which I seem to recall having back in the day as well, however it is a little foggy.

  Reveal hidden contents

Environment Info
Win32NT 7FFFFFFFFFFFFFFF  Args: KSP_x64.exe 

Mod DLLs found:
Stock assembly: Assembly-CSharp v0.0.0.0
ModuleManager v3.0.6.0
MiniAVC v1.0.3.2
aaa_Toolbar v1.7.17.4
MiniAVC v1.0.3.2
USITools v1.0.0.0
MiniAVC v1.0.3.2
ToolbarControl v0.1.5.6 / v1.0.0.0
B9_Aerospace_WingStuff v1.0.0.0
MiniAVC v1.0.3.2
BetterTimeWarp v2.3.10.0
BonVoyage v0.13.2.1
Chatterer v0.9.94.2077
MiniAVC v1.0.3.2
MiniAVC v1.0.3.2
ClickThroughBlocker v0.1.6.0 / v1.0.0.0
CommNetVisualisation v1.0.0.0 / v1.0.2
CCK v2.0.2.0 / v2.0.2.0 for KSP 1.3
ContractConfigurator v1.0.0.0 / v1.24.0
MiniAVC v1.0.3.2
AGExt v2.3.3.0 / v1.0.0.0
TWR1 v1.0.0.0
DMagic v1.3.0.12 / vv1.3.12
ProgressParser v1.0.9.0 / vv9.0
ContractParser v1.0.8.0 / vv8.0
CapCom v1.0.2.8 / vv2.8
ContractsWindow v1.0.8.2 / vv8.2
ContractsWindow.Unity v1.0.8.2
MiniAVC v1.0.3.2
EditorExtensionsRedux v3.3.19.2
Atmosphere v1.4.0.1
CelestialShadows v1.4.0.1
CityLights v1.4.0.1
EVEManager v1.4.0.1
PartFX v1.4.0.1
PQSManager v1.4.0.1
ShaderLoader v1.4.0.1
Terrain v1.4.0.1
TextureConfig v1.4.0.1
Utils v1.4.0.1
_BuildManager v1.4.0.1
Firespitter v7.3.6652.37613
FlexoTubes v1.0.6.0 / v6.0
GTI_MultiModeConverter v2.6.0.0
GTI_MultiModeEngine v2.6.0.0
GTI_MultiModeHarvester v2.6.0.0
GTI_MultiModeIntake v2.6.0.0
GTI_Utilities v2.6.0.0
InterstellarFuelSwitch v2.11.1.0 / v2.11.1
MiniAVC v1.0.3.2
Scale_Redist v1.0.0.0
KAS v0.6.4.0 / v0.6.4 for KSP 1.4+
MiniAVC v1.0.3.1
KerbalEngineer v1.1.4.3
KerbalEngineer.Unity v1.0.0.0
KIS v1.10.6640.40620 / v1.10 for KSP 1.4
KSPDev_Utils.0.31 v0.31.6640.37756 / v0.31 for KSP v1.4
MiniAVC v1.0.3.0
MechJeb2 v2.5.1.0 / v / v2.7.1.0
MiniAVC v1.0.3.2
NavHud v1.3.5.0
MiniAVC v1.0.3.2
PreciseNode v1.2.9.0 / v1.2.4.0
ProjectManager v1.0.0.0
ProgressiveCBMaps v0.1.25.0
ResearchBodies v1.9.7.0
SCANsat v1.8.5.0 / vv18.5
SCANmechjeb v1.8.5.0 / vv18.5
SCANsat.Unity v1.8.5.0
CLSInterfaces v1.2.0.0
ShipManifest v5.2.1.0
SmokeScreen v2.8.0.0
Stock assembly: KSPSteamCtrlr v0.0.1.35
Stock assembly: Steamworks.NET v9.0.0.0 / v9.0.0
MiniAVC v1.0.3.2
TarsierSpaceTech v7.3.0.0
BetterTracking v1.0.2.0 / v2.0
BetterTracking.Unity v1.0.2.0
KerbalAlarmClock v3.9.0.0
TransferWindowPlanner v1.6.3.0
DynamicTanks v1.0.0.0
Konstruction v0.0.0.0
MiniAVC v1.0.3.2
MiniAVC v1.0.3.0
[x] Science! v5.13.6649.40338

Folders and files in GameData:
000_Toolbar
000_USITools
001_ToolbarControl
B9_Aerospace_ProceduralWings
BetterTimeWarp
BonVoyage
Chatterer
ClickThroughBlocker
CommNetVisualisation
CommunityCategoryKit
CommunityResourcePack
ContractConfigurator
ContractPacks
CrowdSourcedScience
Diazo
DMagicOrbitalScience
DMagicUtilities
EditorExtensionsRedux
EnvironmentalVisualEnhancements
Firespitter
FlexoDocking
GTIndustries
GTI_SimpleEPL
GTI_SimpleKarbonite
GTI_Utilities
InterstellarFuelSwitch
JoolBiomes
KAS
KerbalEngineer
Kerbalow
KIS
LETech
MechJeb2
Mk2Expansion
Mk3Expansion
ModRocketSys
NavHud
NearFutureProps
PreciseNode
ProjectManager
REPOSoftTech
SCANsat
ShipManifest
SmokeScreen
Solaris Hypernautics
SpaceY-Lifters
Stock folder: Squad

Stock folder: SquadExpansion

StationPartsExpansion
StockVisualEnhancements
TarsierSpaceTech
TrackingStationEvolved
TriggerTech
UmbraSpaceIndustries
UniversalStorage
[x] Science!
ModuleManager.3.0.6.dll
ModuleManager.ConfigCache
ModuleManager.ConfigSHA
ModuleManager.Physics
ModuleManager.TechTree
toolbar-settings.dat

Does anyone have a clue.

PS: I have tried installing them one by one, and somehow I missed when the problem started... Might be it is a combination thing.

It’s the c# garbage collection.  And usually isn’t a single mod, but the more mods you have, the more garbage there is to clean up

Link to comment
Share on other sites

1 hour ago, linuxgurugamer said:

It’s the c# garbage collection.  And usually isn’t a single mod, but the more mods you have, the more garbage there is to clean up

Just to confirm.... It was/is the garbage collector.

And this helped.

2 hours ago, Tex_NL said:

You might want to check out this thread. As far as I know it's a very common problem.

 

Is changed the settings (padhead.cfg) to

Spoiler

8        : 1
16        : 1
24        : 1
32        : 1
40        : 1
48        : 1
64        : 1
80        : 1
96        : 1
112        : 1
144        : 1
176        : 1
208        : 1
240        : 1
296        : 1
352        : 1
432        : 1
664        : 0
800        : 0
1008    : 0
1344    : 0
2032    : 0
total    : 6144

However, I still find the stutter often, but not nearly as often.

Is this heavy GC because of bad mod coding? And if it is, what can we as modders do different to reduce this?

Link to comment
Share on other sites

I just read the from C# .net version 4.5 it is possible to run a non blocking garbage collection in separate thread!

Unity 2017.1 introduces possiblity of .net 4.6. So if KSP moves to 4.6 we can probably get rid of that annoying stutter! Another great benefit of 4.5+ is much better support for threading.....

Wonder if there are any plans for that? (I know it is currently considered experimental by unity - but one can hope anyways)

Link to comment
Share on other sites

2 hours ago, Warezcrawler said:

Is this heavy GC because of bad mod coding? And if it is, what can we as modders do different to reduce this?

One thing is to eliminate all the "foreach" statements, replace them with "for (int i = 0; i < xxx.Count; i++) {var s = xxx; }

 

Link to comment
Share on other sites

1 minute ago, linuxgurugamer said:

One thing is to eliminate all the "foreach" statements, replace them with "for (int i = 0; i < xxx.Count; i++) {var s = xxx; }

 

Cool... I for one had no clue that foreach created extra garbage. I knew it might not be as efficient, but I considered it purely premature optimization. But with this new information, I do think I will elimination all my foreach statements. Not that is makes any difference unless many more do the same..... But we need to start somewhere.

Thanks @linuxgurugamer

Link to comment
Share on other sites

34 minutes ago, Warezcrawler said:

Cool... I for one had no clue that foreach created extra garbage. I knew it might not be as efficient, but I considered it purely premature optimization. But with this new information, I do think I will elimination all my foreach statements. Not that is makes any difference unless many more do the same..... But we need to start somewhere.

Thanks @linuxgurugamer

Actually, Squad did a major push for that back for 1.3, I believe, and I've been doing it as needed in my mods

Link to comment
Share on other sites

2 minutes ago, linuxgurugamer said:

Actually, Squad did a major push for that back for 1.3, I believe, and I've been doing it as needed in my mods

I was more or less inactive during 1.3 era, so I must have missed out..... I do remember er remove LINQ push back in the day...... :cool:

And I love that modders care, it means a lot when a lightly modded game counts 30-50 mods!

Link to comment
Share on other sites

9 minutes ago, Warezcrawler said:

I was more or less inactive during 1.3 era, so I must have missed out..... I do remember er remove LINQ push back in the day...... :cool:

And I love that modders care, it means a lot when a lightly modded game counts 30-50 mods!

I actually had a bit of a thing with someone who was submitting a big PR to one of my mods.  He was coding in pure OO, and couldnt understand my insistance on speed

Link to comment
Share on other sites

33 minutes ago, linuxgurugamer said:

Actually, Squad did a major push for that back for 1.3, I believe, and I've been doing it as needed in my mods

I've been focusing on not using update/onupdate/fixedupdate etc. any more than needed. You can often get around it by using the right events or considering whether it really needs to run that often. But garbage collection is something new for me to consider.

And in a game like KSP, where things tend to pile up, and the game can go from nice to unplayable easily, these things matter so much that I would rather do premature optimizations than not enough.

Speed is key.

Link to comment
Share on other sites

i still get stutter too even stock game but its short and only happens every so often

however compared to 1.2.2 which i played for over a year 1.4.1 runs leaps better and smoother. i have all the same mods from 1.2.2 and updated them all to 1.4.1 and the game runs 60+ fps almost all the time and will hold this frame rate for hours and reach 100+ fps once in space.

if i play 1.2.2 the game quickly goes from 60 fps to 30 then by the time ive landed on the Mun or where ever its at 15 fps (20min of gameplay) and the only way to fix it is going to tracking stations and re-loading the craft and it goes back to 60 fps for a while but will start to dip if i go to another body.

Link to comment
Share on other sites

20 hours ago, invision said:

i still get stutter too even stock game but its short and only happens every so often

however compared to 1.2.2 which i played for over a year 1.4.1 runs leaps better and smoother. i have all the same mods from 1.2.2 and updated them all to 1.4.1 and the game runs 60+ fps almost all the time and will hold this frame rate for hours and reach 100+ fps once in space.

if i play 1.2.2 the game quickly goes from 60 fps to 30 then by the time ive landed on the Mun or where ever its at 15 fps (20min of gameplay) and the only way to fix it is going to tracking stations and re-loading the craft and it goes back to 60 fps for a while but will start to dip if i go to another body.

Yeah.... Probably impossible to remove all garbage creation, but reducing is possible. And I agree, that performance is better.... But in my modded install I have stutter every 2-3 seconds, which is actually around the same as I had pretty much since 1.0, that is if I do not use MemGraph to boost the allocated memory.

Link to comment
Share on other sites

A note on Memgraph: While increasing mono padding will increase time between GC runs, it's still mostly a *diagnosing* tool. You can use the graph to check how much garbage is created per frame and see if that's in line with normal playing or if something else is creating excessive garbage.

Link to comment
Share on other sites

I had a similar problem. In my case the guilt mod was "[X] Science!". The shutter only occurs when "Now and Here" windows is open. I recommend you to explore their post. A guy recompile the mod to reduce the shuttering.

Link to comment
Share on other sites

1 hour ago, Naeku said:

I had a similar problem. In my case the guilt mod was "[X] Science!". The shutter only occurs when "Now and Here" windows is open. I recommend you to explore their post. A guy recompile the mod to reduce the shuttering.

Ok, thanks... I'll take a look at [X] Science! code than... Maybe there is something that can be done, that even I can figure out. 

Link to comment
Share on other sites

If you're looking to reduce garbage in mods there are a few places to start.

The first, and in most cases by far the worst offenders, are mods using the old IMGUI (anything using the OnGUI method in its code). The old GUI system is horrible, all of its code runs multiple times per frame, it sends potentially huge amounts of draw calls to the GPU, and it seems to be designed to generate garbage. The worst are anything that is constantly updating complex text, or anything that displays a long list of elements, like a scroll view with all of the vessels in game, or all of the science results, something like that with an uncapped number of elements.

Spoiler

A fairly extreme example of this can be seen when I compared the old and new versions of SCANsat. With all of the windows open there is a huge difference in garbage creation, almost all of it due to the strings and other inherent aspects of the old UI system.

The old version, with it's GC shown in the yellow circle represented in the height of the green lines (red lines are gc collections) and the "Last" line shown above it:

VUuYkr1.png

 

Compared to the new version, there is a 8MB difference:

hRc6YEd.png

For more see here: https://forum.kerbalspaceprogram.com/index.php?/topic/87351-ksp-130-scansat-v179-dev-version-june-28-2017/&page=13

Replacing the UI for an old mod is hard though, and really boring. But if you want to make a new mod don't waste time with it.

 

The next big source is lots of string manipulation, which is related to the first since this usually happens in the context of a UI. If something is displaying lots of text data and it does so by combining lots of strings this can really create a lot of garbage. So anything that has lots of:

string text = "Super wastefull " + vesselname + " more waste" + vesselspeed.toString() + ....;

That stuff can be replaced by either string.Format or StringBuilder, depending on how it's created (or even string.join or concat, I think). That gets around some of the inherent problems with string creation.

Also be careful to avoid boxing when using string.Format, and consider some kind of cache for StringBuilder if you use it a lot (there is one built into KSP, or you can make your own, search stringbuildercache and you'll find a million examples).

For string.Format boxing:

Use:
string text = string.Format("Do something {0} times to make {1} less garbage!", 5.ToString(), 0.74f.ToString("P0"));

instead of:
string text = string.Format("Do something {0} times to make {1:P0} less garbage!", 5, 0.74f);

If you don't convert those value types into strings the method will convert them into objects first, then into strings, which generates garbage.

 

Then you get down to the Linq stuff and foreach loops. If Linq is used heavily then it could have a big impact, it can usually be replaced by lots of for loops without much difficulty. I think some of the foreach loop problems have been alleviated in versions after Unity 5.5, but I would still just for loops, there is rarely a reason not to. Dictionaries are potentially a problem, but KSP has the DictionaryValueList to get around this.

 

Also, sort of obviously, if you can reuse objects then do so. For instance, if you make a new list for something every time a method runs, then just cache that list instead and Clear it every time you need to use it again.

Edited by DMagic
Link to comment
Share on other sites

1 hour ago, DMagic said:

If you're looking to reduce garbage in mods there are a few places to start.

The first, and in most cases by far the worst offenders, are mods using the old IMGUI (anything using the OnGUI method in its code). The old GUI system is horrible, all of its code runs multiple times per frame, it sends potentially huge amounts of draw calls to the GPU, and it seems to be designed to generate garbage. The worst are anything that is constantly updating complex text, or anything that displays a long list of elements, like a scroll view with all of the vessels in game, or all of the science results, something like that with an uncapped number of elements.

  Reveal hidden contents

A fairly extreme example of this can be seen when I compared the old and new versions of SCANsat. With all of the windows open there is a huge difference in garbage creation, almost all of it due to the strings and other inherent aspects of the old UI system.

The old version, with it's GC shown in the yellow circle represented in the height of the green lines (red lines are gc collections) and the "Last" line shown above it:

VUuYkr1.png

 

Compared to the new version, there is a 8MB difference:

hRc6YEd.png

For more see here: https://forum.kerbalspaceprogram.com/index.php?/topic/87351-ksp-130-scansat-v179-dev-version-june-28-2017/&page=13

Replacing the UI for an old mod is hard though, and really boring. But if you want to make a new mod don't waste time with it.

 

The next big source is lots of string manipulation, which is related to the first since this usually happens in the context of a UI. If something is displaying lots of text data and it does so by combining lots of strings this can really create a lot of garbage. So anything that has lots of:


string text = "Super wastefull " + vesselname + " more waste" + vesselspeed.toString() + ....;

That stuff can be replaced by either string.Format or StringBuilder, depending on how it's created (or even string.join or concat, I think). That gets around some of the inherent problems with string creation.

Also be careful to avoid boxing when using string.Format, and consider some kind of cache for StringBuilder if you use it a lot (there is one built into KSP, or you can make your own, search stringbuildercache and you'll find a million examples).

For string.Format boxing:


Use:
string text = string.Format("Do something {0} times to make {1} less garbage!", 5.ToString(), 0.74f.ToString("P0"));

instead of:
string text = string.Format("Do something {0} times to make {1:P0} less garbage!", 5, 0.74f);

If you don't convert those value types into strings the method will convert them into objects first, then into strings, which generates garbage.

 

Then you get down to the Linq stuff and foreach loops. If Linq is used heavily then it could have a big impact, it can usually be replaced by lots of for loops without much difficulty. I think some of the foreach loop problems have been alleviated in versions after Unity 5.5, but I would still just for loops, there is rarely a reason not to. Dictionaries are potentially a problem, but KSP has the DictionaryValueList to get around this.

Thanks for this great explanation.

I had no clue that simple string concatenation made extra garbage.....

 

When it comes to the UI, I'm still on trying to compile my first test UI... I have not succeeded... I'm trying to follow your tutorial, but I'm pretty sure that I'm missing some step or something...

In my latest attempt I get the below error when trying to build the UI.

TypeLoadException: Could not load type 'KSPFontAsset' from assembly 'KSPAssetCompiler, Version=1.1.0.0, Culture=neutral, PublicKeyToken=null'.
UnityEditor.Build.BuildPipelineInterfaces.InitializeBuildCallbacks (BuildCallbacks findFlags) (at C:/buildslave/unity/build/Editor/Mono/BuildPipeline/BuildPipelineInterfaces.cs:115)
UnityEditor.BuildPipeline:BuildAssetBundles(String, AssetBundleBuild[], BuildAssetBundleOptions, BuildTarget)
KSPAssets.Editor.AssetCompiler:BuildAssetBundles(Boolean, Boolean, String, String[])
KSPAssets.Editor.<BuildBundles>d__5:MoveNext()
KSPAssets.Editor.EditorUtil:UpdateCoroutine()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()

I think me first problem is getting the parttools and stuff imported correctly, so that I can in fact compile whatever I create. Before I get that done, I don't think it worth the time to create too much UI stuff. And I'm not gonna learn the old OnGUI() methods, and if it does create a lot of garbage, then that's probably for the better.

 

Using Memgraph I estimate that my install creates about 250 MB of garbage every second or so.... So the collector is in overdrive every 2-3 seconds if I do not extend the memory use. But it seems really excessive to create that much garbage I must say.

That said I've gone through my own mod these last day, and have concluded that it does not generation much garbage, or I'm simply missing it. I've changed a few foreach loops, but there was not that much else I could do.

Link to comment
Share on other sites

7 minutes ago, Warezcrawler said:

Using Memgraph I estimate that my install creates about 250 MB of garbage every second or

That's a lot. Something is really wrong in one of your mods.

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