I wonder whether replacing some of the manual memory management of the CommandBuffer by just using a World in its implementation would be useful?
This is an interesting idea. Merging archetypes is also liable to be significantly more efficient than inserting components one at a type from row-major storage, in effect moving cost to CommandBuffer population time, which is comparatively easy to offload--not that this is a cost anyone has complained about yet. On the other hand, the only commands I would think to add at present are despawn and remove operations, which are straightforward to express with simpler means.
This is an interesting idea. Merging archetypes is also liable to be significantly more efficient than inserting components one at a type from row-major storage, in effect moving cost to
CommandBuffer
population time, which is comparatively easy to offload--not that this is a cost anyone has complained about yet. On the other hand, the only commands I would think to add at present are despawn and remove operations, which are straightforward to express with simpler means.