RimWorld

RimWorld

Vanilla Psycasts Expanded
Wealth focus type drops FPS
Unlocking Wealth focus type for psycasters drops FPS really bad.
Like from 120 FPS to 60-80 with 1 pawn having Wealth type.
And down to 20 FPS with 5 pawns Wealth type.

Some debugging showed growing at using functions:
MeditationFocusGain
VanillaPsycastsExpanded.StatPart_NearbyWealth
MarketValue

The last one have huge number of calls.

Screenshot [prnt.sc]

I have Dubs Performance Analyzer mod for searching those mods that drop FPS. You may use another tools of course.

Steps to reproduce:
1. Quick start with dev tools
2. Spawn some more pawns (I had 5)
3. Give them Psycast level (I gave 30)
4. Make sure they fed and happy. All needs are fullfilled.
5. Make their schedule full meditate all day. Make meditate places somewhere in close proximity.
I used anima tree (tribechild40 child backstory) and statues - it reproduces anyway.
6. Measure FPS/TPS with 5 pawns meditating
7. Unlock Wealth Focus for one pawn
8. Measure FPS/TPS again.
Repeat steps 7-8 to see every pawn wealth calculations matters and drops FPS even lower.