RimWorld

RimWorld

Animals Logic
crow1 14 Jan, 2021 @ 11:12am
High performance impact of GenHostility_IsPredatorHostileTo_Patch
Hi. Thank you for creating and maintaining this mod.

I'm seeing a high performance impact of GenHostility_IsPredatorHostileTo_Patch:Prefix (on a big colony, 60 colonists + 300 animals). This happens even when predator detection is disabled (unsurprisingly, as the flag is not checked in the Prefix patch).

Unfortunately I also have problems converting your project from Mono to VS, so can't really check it, but could you maybe consider disabling creating of __state in the Prefix, if the functionality is disabled?
< >
Showing 1-7 of 7 comments
ignis  [developer] 14 Jan, 2021 @ 11:48am 
Prefix patch only stores sized for future compare. It adds some overhead, but it shouls be neglectable amount. I haven't added check because it should be comparable in impact to the function itself.

Project is actually built in VC, bt the way.

You can try current version from github - I've added check to prefix there
https://github.com/quicksilverfox/RimworldMods
crow1 22 Jan, 2021 @ 8:15am 
Hello again. While I was eventually able to recompile the mod on my side, I do struggle to get a reproducible scenario for my report. The mentioned method is sometimes close to 1ms execution time average and I have seen some spikes, but unfortunatelly I cannot create a scenario for decent analysis. Seems also no other players reported such problems, so must be something on my side. Thanks for reply and sorry for bother.

https://ibb.co/VWGJ2P0
crow1 18 Feb, 2021 @ 12:56pm 
Hello again. While I did not work further on providing more reproducible scenario for high performance impact of IsPredatorHostile patch, it still does from time to time jump in execution time for me. I have also discussed this on the known Rimworld mod performance discord, and the members also observed that phenomena in the past. I also got replies that they commented the patch out in their local copies of the mod and I have done it myself as well. So, while it is no longer a pressing issue for me, and I will continue to use your mod for its other great functionalities, perhaps it is something to keep at the back of the head.
Angel 5 Mar, 2021 @ 2:24pm 
Originally posted by crow1:
Hello again. While I did not work further on providing more reproducible scenario for high performance impact of IsPredatorHostile patch, it still does from time to time jump in execution time for me. I have also discussed this on the known Rimworld mod performance discord, and the members also observed that phenomena in the past. I also got replies that they commented the patch out in their local copies of the mod and I have done it myself as well. So, while it is no longer a pressing issue for me, and I will continue to use your mod for its other great functionalities, perhaps it is something to keep at the back of the head.

Is the overhead added by the hostile animals significant and all the time, or does it only run when you are being attacked? I don't really want to disable this feature because it allows turrets to protect my pawns. but if it's a big deal I shall.
ignis  [developer] 6 Mar, 2021 @ 1:51pm 
It is not confirmed. I don't have problems with it and I don't see how it could even be a problem.
Madman666 10 Mar, 2021 @ 1:51am 
Originally posted by bearhiderug:
could this be pactehd for mod too? curiou bc i have spent two day combing everything for performance, and this mod is a top dog for choices of mods, simply bc my kid and i both do alot of animal husbadry lol

You re welcome to join https://discord.gg/TY3Fdqqb We have a version without IsHostile patch. Of course that prevents that mod feature from working (disabling it in options for some reason doesn't eliminate its performance impact), but the rest of the mod is still intact and does its thing.
Madman666 10 Mar, 2021 @ 2:03am 
Yeah a simple replace in the local mod folder. Unpack it and its ready. Probably would be best to reset mod settings before use. The link, if you re not afraid of archives https://dropmefiles.com/uneQc
< >
Showing 1-7 of 7 comments
Per page: 1530 50