reeseschultz / ReeseUnityDemos

Unity packages and demos—emphasizing ECS, jobs and the Burst compiler—by Reese and others.
https://reese.codes
MIT License
515 stars 45 forks source link

Find a way to lighten the load on the (built-in) EndFrameParentSystem #4

Closed reeseschultz closed 4 years ago

reeseschultz commented 4 years ago

If there are a considerable number of NavAgents, right now the NavPerformanceDemo's EndFrameParentSystem gets blasted because, I'm assuming, tracking all of the agents parented to the automatically generated default basis. But, it still seems to me that there's more to this. I would think the performance would be better (not that it's bad, it's pretty awesome compared to being limited to a single thread). Anyway, perhaps I'm not optimizing something correctly. If anyone can shed light on my EndFrameParentSystem concerns, without toggling parenting (and thus jumping) altogether, please let me know. Regardless, I'll continue to sit on this issue and think about it for a while before I add or change anything.

reeseschultz commented 4 years ago

I've local changes looking like they're going to drastically reduce the load on the EndFrameParentSystem, boosting performance beyond what I thought possible. Hoping to push this stuff either tonight or tomorrow.

reeseschultz commented 4 years ago

05aec90776b34b3897943f95a16c903191f515c9 seems to have largely alleviated the concerns here, improving the performance of all the nav demos tremendously. Closing. Would prefer to open a different issue if the EndFrameParentSystem comes up again.