Here, the two blocks are executed on a schedule relative to Find.TickManager.TicksGame. This should work fine, but, especially if there are a lot of pawns being checked (e.g., a large colony, or a large raid, even), this would lead to refreshing the cache and processing pawn relation information for every single pawn on the same tick. Could these checks be modified to incorporate the IsHashIntervalTick Pawn extension method?
Granted this only runs for spawned pawns, but a potential smoothing out of ticking pawn calculations is a potential smoothing out of ticking pawn calculations. :)
This is half a question and half a performance suggestion, so I apologize if I'm way off.
This is regarding the code here: https://github.com/emipa606/GradualRomance/blob/3de4ced57f214e7cf22f917321c5f84992c2e432/Source/Gradual%20Romance/GRPawnComp.cs#L29-L38
Here, the two blocks are executed on a schedule relative to
Find.TickManager.TicksGame
. This should work fine, but, especially if there are a lot of pawns being checked (e.g., a large colony, or a large raid, even), this would lead to refreshing the cache and processing pawn relation information for every single pawn on the same tick. Could these checks be modified to incorporate theIsHashIntervalTick
Pawn extension method?Granted this only runs for spawned pawns, but a potential smoothing out of ticking pawn calculations is a potential smoothing out of ticking pawn calculations. :)