lilwhitemouse / RimWorld-LWM.DeepStorage

A mod for the game RimWorld that has a set of Deep Storage Units that allow storing more than one item at a location.
GNU General Public License v3.0
29 stars 36 forks source link

Rimworld.StoreUtility.NoStorageBlockersIn - Slamming FPS #124

Open docssy opened 2 years ago

docssy commented 2 years ago

Hiya LWM,

I'm doing some stress testing and based on the picture, you can see a whole bunch of performance challenges (on purpose). Anyways, with your storage shelves the game is very much stuttering inside [NoStorageBlockersIn]. I'm seeing about 250,000 calls per second.

PUAH+ / While You Are Up I'm assuming is depending on [NoStorageBlockersIn] to complete as well.

image

Is there any way to refine this code or consider holding a cache of storage and their blockers/contents?

Anything that reduces performance hits on a popular mod is appreciated!

docssy commented 2 years ago

image 1 second-ish calls

docssy commented 2 years ago

image Finally, the stack

docssy commented 2 years ago

image

And inside [NoStorageBlocksIn]. Note the 2-3ish ms for everything in here, compared to the 1500ms spikes. Something is not being very productive

LytsePier commented 2 years ago

I've got the exact same problem. This is also taking up 1500ms and slamming my FPS