Skip to content

Generational entity IDs #6458

@moonheart08

Description

@moonheart08

Currently, our entity IDs are a single int. This is fine, it's not done anything wrong, but for future work involving optimizing how the ECS stores our entity data we need to migrate it to a generational scheme (two ints.)

This is going to be a relatively long migration, and it involves:

  • Obsoleting all APIs that leak the underlying EntityUid integer.
  • Changing the written format of entityuid from 1234 to 1234v1234.
  • Changing entity metadata to include the generation while allowing backing storage to continue using integer IDs.

The immediate improvement is that entity IDs can be given a freelist, reducing the range of entity ids so that they stay in the 100ks. This improvement can then be used to improve random access times for specific common components (like metadata).

Blocked on

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions