More speed, more optimizations. Items were using
ScriptableObjects, which are great because they're automatically serialized and you can view them from the editor and they have a nice Destroy function. But it turns out they also eat memory for breakfast relative to a regular class, especially when you have tens of thousands of them lying around. So they are all just plain old classes now. And it's all good.
Before (memory used in bytes is on left):
After:
It's worth keeping in mind here that we might not have the same amount of items lying around at the end of this graph - but at the start it's exactly the same situation. And I'm seeing a nearly 100mb difference in Unity's memory usage. Yikes!
Also we had a few situations where we were using
InvokeRepeating to call functions every second etc (which seems like it'd be a slow way to do it, but it isn't). When we had multiple ones of these running they would eventually bunch up so they'd all be called on the same frame, which could cause a tiny < 50ms hitch. We fixed this by varying the repeat time on each one by about 1% - which meant that if they all managed to get bunched up, they would un-bunch automatically over time.