Hi, I’m trying to optimize by adding “dirty” tag to modified entities, if I understand it right, they will be org-ed into an archetype and so that I could loop on those dirty data in chunks.
And here I’m having some serious performance problems.
- SysModData is a system responsible to loop through entities generated from input cmds, and mark modified entity with “dirty” tag.
It takes 13ms for this sys to run, but then it takes 350ms for EntityCommandBuffer.playback to finish.
(It’s estimated that there might be 25K ~ 30K “dirty” tags to be added, and 250K input-Item entity be destroyed)
- SysUpdateAtt would loop through the dirty entities, process them and remove the dirty tags.
The system jobs takes around 16ms, and the EntityCommandBuffer.playback takes around 130ms
So my question is:
- Is it normal that EntityCommandBuffer takes so much time for such number of structural change?
- I read that the “jobIndex” parameter passed to CommandBuffer could impact the performance, how can I detect if that happens?