Question about performance
See original GitHub issueHi,
I have question about performance. I am realy begginer in programming but i try ur Entitas-CSharp and it feel realy, realy great. I saw ur videos 2015 and 2016 about it. And saw a few test in those videos. But i still have a question.
My project for now it some kind of evolution simulation. Where i have wolrd 150x150 where each cell is an object. Where we have many other objects (bush, seed, animal around 10000-20000 of each). And they all do very many actions each turn. All of that require a lot of performance.
And now close to my question. I saw https://www.youtube.com/watch?v=tGmnZdY5Y-E video and in https://youtu.be/tGmnZdY5Y-E?t=1094 Joachim Ante says about struct, iComponentData and memory reading. In my project where i must read a few arrays with 10000+ members in each memory reading can be a part of performance boost. In ur exeample https://github.com/sschmid/Entitas-CSharp/wiki/Unity-Tutorial-Hello-World we have one component:
using Entitas;
[Game]
public class DebugMessageComponent : IComponent
{
public string message;
}
but he is a class. If we have array 20000 entity how they will be use a mamory? How fast reading will be? if we change it to:
using Entitas;
[Game]
public struct DebugMessageComponent : IComponent
{
public string message;
}
it will be faster? (it work, i try to do that in example)
I am sorry if my question is stupid, and i am sorry for my poor english. But I will be very grateful for your reply.
with many thanks.
Issue Analytics
- State:
- Created 6 years ago
- Comments:12 (5 by maintainers)

Top Related StackOverflow Question
@owengalenjones This is fixed as of 0.47.3, see #540 for a workaround
Yes, if you’re dealing with thousands of entities, you can get a massive performance boost by not using the replace method. Groups will still work, but reactive systems and EntityIndex only work in combination with the replace method