Repository navigation
Replies: 1 comment 1 reply
|
concerns are justified however i feel like these can be broken down into different categories..
to confirm the allocation and removal paths in a bevy checkout: rg -n 'fn reserve\(|fn clear\(|swap_remove_unchecked|alloc::alloc::realloc' crates/bevy_ecs/src/storage/table/mod.rs crates/bevy_ecs/src/storage/blob_array.rsi verified these paths against the source at commit |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Hello, maintainers! Could you spare me a moment to address my concerns?Thank you!
Vec's expansion rules, it need to copy all the data to a new piece of memory. If there is aTablewith too manyEntity, will there be a performance hit when thisTable's storage needs to be expanded? When aTableneeds to be expanded, eachColumn'sVecof it needs to to be expanded, there is huge amount of data needs to be copied.Vechas no capacity reduction mechanism. If the entities in aTableincrease significantly, but only few of entities remains affterwards, that will result in a waste of memory.Componentis stored in a separateVec, which means their location in memory are not related. InBevy's repo, I saw there are manySystemquery a lot ofComponentat once and read&write them in arbitrary order. Does loading data from a differentComponentimply a refresh of the cache line?If these concerns are indeed valid, I think the Archetype Chunks in Unity may work.
All reactions