Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
The harmony patch that checks for pawn "presence" isn't a tickwise thing (mostly). At the beginning of the tick I cache what room a pawn is in, and at the end of the tick I check if it has changed. That alone is not going to cause any performance repercussions even with vastly great numbers of pawns -- the normal calculations that pawn alone does during its tick are going to massively dwarf a simple pointer copy and comparison.
When that option is disabled, the comparison never takes place, and the post-tick patch exits early without ever detecting a room change. The only time the lights ever received updates when you posted this was when a room change was detected, which the mod option disabled. Light updates were not happening, and room checks were also not happening.
There is nothing intensive running at any regular interval (e.g. tickwise) that would affect your constant TPS. The MOST intensive thing that gets called every tick is multiplying the coefficient of power draw, which happens every tick for every powered bench and light. I guarantee to you that the stuff this game does every tick make even that a drop in the bucket. If you were noticing hitching as pawns enter/exit rooms, then that's something we can discuss since there's some stuff happening there -- which to be clear, is still basically nothing when compared to the existing game code.
TL;DR: out of the 30k+ people that have downloaded this mod, less than half a dozen have claimed it has affected their performance; I'm inclined to believe that if it had this dramatic of an impact on the game, I would have noticed, and at least some of the folks that downloaded it would have noticed too.
Results:
My patches running combined to 1.797ms avg. Detecting room changes: 0.073ms avg. Recurring ticks: 1.724ms avg. Max running times came from a singular spike; the VAST majority of the time they were making almost no impact.
TPS was solid ~355-365 (goal of 360@3x), framerate dropped into the 40s.
If 40 pawns and a ridiculous number of lights barely made an impact, your numbers are unrealistic.
IMPORTANT NOTE: this was done with the latest version of the mod, which has memoization added in the hot path for the top patch. Your original post was from prior to that addition; while I don't believe it performed that poorly, I certainly do not have performance data from that time period, so I can't at all say that it didn't perform that poorly then, I can only say that it doesn't perform that poorly now.
I've got the whole mod down to ~0.07ms avg on 1x speeds, and ~0.5ms avg on 3x speed, down from the 1.797ms total on 3x yesterday.
Recurring tick time on 3x speed got brought down to <0.425ms, which is a lot better than before, regardless of whether the previous performance was acceptable or not.
Hopefully that addresses your concerns!
RimThreaded is asking for trouble. I can’t guarantee my mod can work with RimThreaded because collections are NOT threadsafe in RimWorld, so that mod is free to trample them and generate exceptions in my mod.