Are memory requirements O(entities * component types)?
还没有人认领这个 Issue。
评估
调研方向
从 EntityManager::assign 和 issue 中所示的 placement-new 调用开始,然后检查组件池的实现以及 get(id.index())。确定存储空间是为每个实体分配,还是仅为已分配的组件分配。完成的标准是解决内存行为问题,并根据该调查确定任何所需的澄清或更改。
由索引模型根据 Issue 内容生成。
描述
Reading the code, it seems to me like components share the index of their Entity, e.g. the Position Component for Entity #1,000,000 will the 1,000,000th Position Component in the Position Component Pool.
Am I understanding this correctly? If I have 1,000,000 entities, and there is one instance of the Foobar component, but it happens to be on entity 999,999, then we'll have to eat the memory of unused 999,998 unused components in the Foobar pool?
Am I reading the code correctly? If I'm wrong, can you help me understand how?
I'm mainly looking at EntityManager::assign to make this determination, specifically in the placement new:
::new(pool->get(id.index())) C(std::forward<Args>(args) ...);
where pool is the component pool, and id is the entity id.
- 主要语言
- C++
- 星标
- 2.3k
- 派生
- 300
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
alecthomas/entityx 的其他 Issue
-
Test Fails未关闭
难度 3/5 1-2 天 新手友好度 35/100
alecthomas/entityx#256 ·
-
难度 3/5 1-2 天 新手友好度 32/100
alecthomas/entityx#246 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 20/100
alecthomas/entityx#238 · 11 条评论 ·
-
难度 5/5 一周以上 新手友好度 20/100
alecthomas/entityx#237 · 1 条评论 ·
-
难度 5/5 一周以上 新手友好度 20/100
alecthomas/entityx#227 · 2 条评论 ·
查看 alecthomas/entityx 的全部 Issue
相似的 Issue
-
agent:Windows bug parity performance pri:medium sev:low tooling windows
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
ai_p2
难度 2/5 1-3 小时 新手友好度 80/100
ClickHouse/ClickHouse#132519 ·
维护者通常 1 天内回复
-
patch_advisor_json_integration fails when the build tree is reached through a symbolic link可能已有人在做 @DerKarussellbremser 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 88/100
boykopovar/AnyPS5#22581 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
BlueQuartzSoftware/simplnx#1987 ·
维护者通常 6 天内回复