#What are the performance benefits of the upcoming "ECS for all"?

1 messages · Page 1 of 1 (latest)

rich raven
#

All gameobjects will be ECS entities so I'm guessing there will also be a lot of insane performance improvements?

Could the developers say exactly what they will be? For example will GetComponent become way more efficient? And FindObjectOfType? Anything else?

And can the developers also give a comparison of the code complexity in big O notation for each method that will be improving in performance?

vast aspen
#

So there are a few different changes coming up and I'm going to try and be specific.

The change to make all GameObjects also be entities will allow two avenues to performance improvement: allowing you to use chunk storage (IComponentData), and letting you write Entity Component System (ECS) style queries to operate on data on your game objects. If you've still got traditional based MonoBehaviour simulation, with individually allocated Component data and OOP style updates, it won't be any faster due to that change. But it does make it easier to write ECS style code operating on primarily GameObject data.

There are some data design changes to the TransformHierarchy (internal transform representation that backs the managed Transform component) that may improve speed under some circumstances by making it easier to process in parallel.

I wouldn't anticipate a significant improvement in performance of traditional MonoBehaviour style APIs as a result of these changes specifically. That said I do anticipate we'll use ECS for all to accelerate internal features (and there are other, unrelated, changes going on related to scripting performance) so we'll definitely keep you posted. Except for FindObjectsOfType which should not be used in performance sensitive contexts.

rich raven
# vast aspen So there are a few different changes coming up and I'm going to try and be speci...

does this mean that we can mix normal unity and ECS workflows? which would be useful for people who don't know too much of ECS/DOTS and are not comfortable with making a full game with it due to a lack of knowledge. will it be easy to make some parts of our code use ECS while intertwined with non-ECS code? especially for parts of code that could have big performance benefits when using ECS