RimWorld

RimWorld

Psychology
 This topic has been pinned, so it's probably important
The Word-Mule  [developer] Oct 30, 2018 @ 10:10pm
Performance Reports
Copy-paste your performance reports here if you are running the mod with benchmarking on. Please note that the longer you play without quitting, the more useful your report will be to me.
< >
Showing 1-4 of 4 comments
Mythos Nov 11, 2018 @ 4:52am 
Hope this might help you. Runtime round about 1h so far.
Will do a longer run soon.

https://pastebin.com/tuGKnXWq
https://pastebin.com/YEN25xDX
https://pastebin.com/vDV6WnnZ
YunoAloe Aug 7, 2019 @ 7:03pm 
I want to post a different kind of report. I have about 60 mods, almost entirely of popular stuff. I've seen a lot of people complaining how Psychology drags the overall game performance down, to a point that of all my modlist this looked like the biggest consumer. So after noticing a significant gradual performance drop in 6 years of my colony on default tutorial map, I did some testing.
I'm running on a very top CPU by this metric https://www.cpubenchmark.net/singleThread.html , GeForce 2080 Ti, 64Gb RAM, SSD. My colony: https://imgur.com/a/9vWmIwD - 20 pawns, about 120 animals (remaining, was 2x more before boomalopes + infestation incident in the barn). I used TicksPerSecond mod for tps and Fraps for fps. I used dev console "destroy" feature to remove stuff (note that it also removed beds under everyone). I looked at maximum zoom in into an unexplored mountain, using Camera+ mod, since what is on the display, and especially zoom, critically impacts both fps and tps. I ran the tests on 4 speeds, including the dev speed.

all full
60-45-30-15 fps
60-180-300-400 tps

half pawns, full animals
60-45-30-15 fps
60-180-300-500 tps

half pawns after runtimegc, full animals
60-45-30-15 fps
60-180-300-500 tps

no pawns & also same result after runtimegc (full animals)
60-50-25-20 fps
60-180-500-600 (the speed limiters are semi-dynamic for some reason)

no pawns and half animals
60-60-50-45 fps
60-180-720-850 tps

no pawns and no animals (runtimegc had no animal family trees to remove)
60-60-58-55 fps
60-180-720-900 tps

max zoom out, only on speed 1
no pawns & no animals = 35 fps / 60 tps
full pawn & no animals = 30 fps / 55 tps
all full = 25 fps / 50 tps
new map = 60 fps / 60 tps

no psychology mod, all full
60-45-30-15 fps
60-180-300-400 tps

full pawns & no animals
60-50-45-22 fps
60-180-360-600 tps

fresh new map at all default settings
60-60-60-60 fps
60-180-360-900 tps


From these results I can conclude that by far the biggest consumer for me is animals, the second and third are unknown (probably items on map, lightning, etc) and pawns altogether. And from pawns, psychology has no effect whatsoever - when I disabled it, there was a near-zero effect to performance. The pawns continued to function what looked like normally, but the UI got broken so I couldn't do anything (even open the menu).

I'd like to ask anyone reading this, how do I actually properly profile the mods, preferably without visual studio? I'm familiar with JDK, but not the C family. I tried "Very Sleepy CS" but it sisn't produce any result meaningful to me. I tried Unity profiler, but it seems that I can't attach a regular complete installed game to the Unity editor. I want to know which mods are performing the worst, how do I do this? Also I almost forgot to mention that I sometimes have annoying short stuttering, like 0.2 sec every 10 sec, which look like GC event, which also seem to have decreased once I activated runtimegc mod on a permanent basis. I suspect some mod is leaking memory (this doesn't happen on a new map), how do I find out which without disabling them 1 by 1?
The Word-Mule  [developer] Aug 8, 2019 @ 12:12pm 
I use a custom C# injector with the Harmony library to add my profiling code.

I don't think anything is leaking memory (though I can't speak for mods, they would have to mess up real bad to accomplish that). The game's algorithms and data structures are just poorly optimized. The number of ticks the game does has a huge effect on performance. The more animals you have, the more pawn ticks you do (and pawn ticks are very costly because pawns are complicated). That is why you lose so many frames from having animals.
YunoAloe Aug 8, 2019 @ 2:47pm 
I think I need to ask Ludeon for symbols or something...
Here's my report anyway, for 15 minutes or so.

Psychology :: Performance Report :: Top 10 average tick consumers:
PawnRelationWorker_Sibling_GenerateParentPatch.KinseyException (66374.5)
InteractionWorker_HangOut.Interacted (57200)
Hediff_Conversation.PostRemoved (13123.79)
InteractionWorker_Conversation.Interacted (8794.028)
InteractionWorker_HangOut.RandomSelectionWeight (4860.088)
LordJob_VisitMayor.Finished (4133)
Hediff_Conversation.CreateSocialThought (2467.743)
PsycheCardUtility.DrawPersonalityNodes (2331.683)
InteractionWorker_RomanceAttempt_SelectionWeightPatch.PsychologyException (854.1416)
Pawn_PsycheTracker.Initialize (534.0667)

Top 10 weighted tick consumers: VoluntarilyJoinableLordsStarter_StartPartyPatch.ExtraSocialiteParties (0)
Hediff_Mayor.Tick (0)
Need_Rest_IntervalDreamPatch.CauseDream (0)
Pawn_StoryTracker_MayorLabel.SetMayorLabel (0)
Need_Rest_IntervalInsomniacPatch.MakeInsomniacLessRestful (0)
Hediff_Anxiety.Tick (0)
Hediff_Conversation.Tick (0)
Pawn_JobTracker_EndCurrentJobPatch.HeavySleeperTrait (0)
PsycheCardUtility.DrawPersonalityNodes (2331.683)
InteractionUtility_CanInitiate_Patch.PsychologyAddonsForCanInitiate (0)
< >
Showing 1-4 of 4 comments
Per page: 1530 50